================
@@ -67,7 +67,8 @@ void CIRGenModule::emitGlobal(clang::GlobalDecl gd) {
return;
}
} else {
- errorNYI(global->getSourceRange(), "global variable declaration");
+ const auto *vd = cast<VarDecl>(global);
+ assert(vd->isFileVarDecl() && "Cannot emit local var decl as global");
----------------
erichkeane wrote:
This is going to result in an 'unused variable' warning in release mode. So
inline hte 'cast' into the assert, or put a `(void)vd` at one point.
https://github.com/llvm/llvm-project/pull/118743
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits