[clang] [CIR] Upstream support for cir.get_global (PR #135095)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 16:50:36 PDT 2025
================
@@ -200,6 +200,105 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd,
}
}
+mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) {
+ mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name);
+ if (!global)
----------------
erichkeane wrote:
Er... what does this do? This 'if' ends up being a do-nothing here, since it just returns 'global' anyway.
https://github.com/llvm/llvm-project/pull/135095
More information about the cfe-commits
mailing list