Skip to content

Commit 163a7e1

Browse files
authored
[mlir][LLVMIR][NFC] Remove duplicate getUnnamedAddrAttrName uses in op printers (#146090)
Fix `UnnamedAddrAttrName` being inserted twice into the `elidedAttrs` list for the attribute dictionary printer in `GlobalOp` and `AliasOp` print functions.
1 parent 93849a3 commit 163a7e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,8 +2245,7 @@ void GlobalOp::print(OpAsmPrinter &p) {
22452245
getGlobalTypeAttrName(), getConstantAttrName(),
22462246
getValueAttrName(), getLinkageAttrName(),
22472247
getUnnamedAddrAttrName(), getThreadLocal_AttrName(),
2248-
getVisibility_AttrName(), getComdatAttrName(),
2249-
getUnnamedAddrAttrName()});
2248+
getVisibility_AttrName(), getComdatAttrName()});
22502249

22512250
// Print the trailing type unless it's a string global.
22522251
if (llvm::dyn_cast_or_null<StringAttr>(getValueOrNull()))
@@ -2588,7 +2587,7 @@ void AliasOp::print(OpAsmPrinter &p) {
25882587
{SymbolTable::getSymbolAttrName(),
25892588
getAliasTypeAttrName(), getLinkageAttrName(),
25902589
getUnnamedAddrAttrName(), getThreadLocal_AttrName(),
2591-
getVisibility_AttrName(), getUnnamedAddrAttrName()});
2590+
getVisibility_AttrName()});
25922591

25932592
// Print the trailing type.
25942593
p << " : " << getType() << ' ';

0 commit comments

Comments
 (0)