================ @@ -324,8 +358,16 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty, return entry; } - errorNYI(d->getSourceRange(), "reference of undeclared global"); - return {}; + mlir::Location loc = getLoc(d->getSourceRange()); + + // mlir::SymbolTable::Visibility::Public is the default, no need to explicitly + // mark it as such. + cir::GlobalOp gv = + CIRGenModule::createGlobalOp(*this, loc, mangledName, ty, + /*insertPoint=*/entry.getOperation()); + + // errorNYI(d->getSourceRange(), "reference of undeclared global"); ---------------- erichkeane wrote:
Oh? https://github.com/llvm/llvm-project/pull/138222 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits