================ @@ -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 [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits