[clang] [CIR] Integral types; simple global variables (PR #118743)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 06:28:18 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list