[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.
This commit is contained in:
Robert Konicar
2025-06-30 21:57:05 +02:00
committed by GitHub
parent 93849a39c4
commit 163a7e1b4f

View File

@@ -2245,8 +2245,7 @@ void GlobalOp::print(OpAsmPrinter &p) {
getGlobalTypeAttrName(), getConstantAttrName(),
getValueAttrName(), getLinkageAttrName(),
getUnnamedAddrAttrName(), getThreadLocal_AttrName(),
getVisibility_AttrName(), getComdatAttrName(),
getUnnamedAddrAttrName()});
getVisibility_AttrName(), getComdatAttrName()});
// Print the trailing type unless it's a string global.
if (llvm::dyn_cast_or_null<StringAttr>(getValueOrNull()))
@@ -2588,7 +2587,7 @@ void AliasOp::print(OpAsmPrinter &p) {
{SymbolTable::getSymbolAttrName(),
getAliasTypeAttrName(), getLinkageAttrName(),
getUnnamedAddrAttrName(), getThreadLocal_AttrName(),
getVisibility_AttrName(), getUnnamedAddrAttrName()});
getVisibility_AttrName()});
// Print the trailing type.
p << " : " << getType() << ' ';