[Mlir-commits] [mlir] [MLIR] Enable import of non self referential alias scopes (PR #121987)

Christian Ulmann llvmlistbot at llvm.org
Tue Jan 7 23:04:16 PST 2025


================
@@ -473,9 +485,17 @@ ModuleImport::processAliasScopeMetadata(const llvm::MDNode *node) {
       StringAttr description = nullptr;
       if (!aliasScope.getName().empty())
         description = builder.getStringAttr(aliasScope.getName());
+      Attribute idAttr;
+      if (verifySelfRef(scope)) {
+        idAttr = DistinctAttr::create(builder.getUnitAttr());
+      } else {
+        auto Name = cast<llvm::MDString>(scope->getOperand(0));
----------------
Dinistro wrote:

```suggestion
        auto name = cast<llvm::MDString>(scope->getOperand(0));
```

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


More information about the Mlir-commits mailing list