[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)
Steven Perron via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 08:36:12 PDT 2025
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/138530 at github.com>
================
@@ -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));
----------------
s-perron wrote:
I think you want the poison value here. Undef is being deprecated.
https://github.com/llvm/llvm-project/pull/138530
More information about the cfe-commits
mailing list