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