================ @@ -6098,7 +6100,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, // HLSL variables in the input address space maps like memory-mapped // variables. Even if they are 'static', they are externally initialized and // read/write by the hardware/driver/pipeline. - if (LangOpts.HLSL && GetGlobalVarAddressSpace(D) == LangAS::hlsl_input) + if (LangOpts.HLSL && + (GetGlobalVarAddressSpace(D) == LangAS::hlsl_input || + GetGlobalVarAddressSpace(D) == LangAS::hlsl_push_constant)) ---------------- s-perron wrote:
Same code in two places. Is it worth replacing this with a function call in HLSLSema? https://github.com/llvm/llvm-project/pull/166793 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
