[PATCH] D132977: [HLSL] Call global constructors inside entry
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 8 10:32:28 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:167-170
+ assert(cast<ConstantInt>(CS->getOperand(0))->getValue() == 65535 &&
+ "HLSL doesn't support setting priority for global ctors.");
+ assert(isa<ConstantPointerNull>(CS->getOperand(2)) &&
+ "HLSL doesn't support COMDat for global ctors.");
----------------
Do we have sema checks for this so users get decent diagnostics instead of a crash (or miscompile)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132977/new/
https://reviews.llvm.org/D132977
More information about the cfe-commits
mailing list