================
@@ -2969,6 +2969,11 @@ static LValue EmitGlobalVarDeclLValue(CodeGenFunction
&CGF,
llvm::Value *V = CGF.CGM.GetAddrOfGlobalVar(VD);
+ if (VD->hasAttr<OMPIteratorAttr>()) {
+ llvm::GlobalVariable *Var = llvm::dyn_cast<llvm::GlobalVariable>(V);
+ Var->setInitializer(CGF.CGM.EmitNullConstant(E->getType()));
----------------
ShashwathiNavada wrote:
> This is not the place to set an initializer for a variable.
>
> For most variable definitions, there's a single location where it makes sense
> to "define" the variable.
Thank you for the response, I have moved the definition. Does it look good now?
https://github.com/llvm/llvm-project/pull/141507
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits