[Mlir-commits] [mlir] [mlir] Use getAttr to replace getInherentAttr in the test-symbol-uses pass (PR #172675)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Dec 17 07:10:21 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: lonely eagle (linuxlonelyeagle)

<details>
<summary>Changes</summary>

Fix https://github.com/llvm/llvm-project/issues/172603.

---
Full diff: https://github.com/llvm/llvm-project/pull/172675.diff


1 Files Affected:

- (modified) mlir/test/lib/IR/TestSymbolUses.cpp (+1-1) 


``````````diff
diff --git a/mlir/test/lib/IR/TestSymbolUses.cpp b/mlir/test/lib/IR/TestSymbolUses.cpp
index b470b15c533b5..59014b93a0df7 100644
--- a/mlir/test/lib/IR/TestSymbolUses.cpp
+++ b/mlir/test/lib/IR/TestSymbolUses.cpp
@@ -59,7 +59,7 @@ struct SymbolUsesPass
               symbolUse.getUser()->getParentOp(), symbolUse.getSymbolRef())) {
         symbolUse.getUser()->emitRemark()
             << "found use of symbol : " << symbolUse.getSymbolRef() << " : "
-            << *symbol->getInherentAttr(SymbolTable::getSymbolAttrName());
+            << symbol->getAttr(SymbolTable::getSymbolAttrName());
       }
     }
     symbol->emitRemark() << "symbol has " << llvm::size(*symbolUses) << " uses";

``````````

</details>


https://github.com/llvm/llvm-project/pull/172675


More information about the Mlir-commits mailing list