================
@@ -5636,6 +5636,8 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl 
*D,
     Init = llvm::UndefValue::get(getTypes().ConvertTypeForMem(ASTTy));
   else if (D->hasAttr<LoaderUninitializedAttr>())
     Init = llvm::UndefValue::get(getTypes().ConvertTypeForMem(ASTTy));
+  else if (GetGlobalVarAddressSpace(D) == LangAS::hlsl_input)
+    Init = llvm::UndefValue::get(getTypes().ConvertTypeForMem(ASTTy));
----------------
Keenuts wrote:

I don't think we want `poison`: the value will be set by something outside.
Maybe I should change the condition below which calls `setInitializer` so we 
don't add any poison/undef.

https://github.com/llvm/llvm-project/pull/138530
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to