================ @@ -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) ---------------- andykaylor wrote:
Oh, weird. The incubator code had `return {};` here, so it wasn't as obvious. I changed that to `nullptr` since it was actually returning a pointer and not an MLIR value, but I didn't notice the obvious redundancy of this. I'm pretty sure you're right that we can just return from line 204. https://github.com/llvm/llvm-project/pull/135095 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits