[Mlir-commits] [mlir] [MLIR][LLVM] Implement LLVM dialect support for global aliases (PR #125295)
    Christian Ulmann 
    llvmlistbot at llvm.org
       
    Mon Feb  3 23:55:05 PST 2025
    
    
  
================
@@ -447,15 +447,21 @@ convertOperationImpl(Operation &opInst, llvm::IRBuilderBase &builder,
         addressOfOp.getGlobal(moduleTranslation.symbolTable());
     LLVM::LLVMFuncOp function =
         addressOfOp.getFunction(moduleTranslation.symbolTable());
+    LLVM::AliasOp alias = addressOfOp.getAlias(moduleTranslation.symbolTable());
 
     // The verifier should not have allowed this.
-    assert((global || function) &&
-           "referencing an undefined global or function");
-
-    moduleTranslation.mapValue(
-        addressOfOp.getResult(),
-        global ? moduleTranslation.lookupGlobal(global)
-               : moduleTranslation.lookupFunction(function.getName()));
+    assert((global || function || alias) &&
+           "referencing an undefined global, function or alias");
----------------
Dinistro wrote:
```suggestion
           "referencing an undefined global, function, or alias");
```
Ultra nit.
https://github.com/llvm/llvm-project/pull/125295
    
    
More information about the Mlir-commits
mailing list