beanz 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.");
----------------
aaron.ballman wrote:
> Do we have sema checks for this so users get decent diagnostics instead of a 
> crash (or miscompile)?
It looks like COMDats are only attached if object format supports them (and 
DXContainer isn't properly handled there). I don't think there is any 
sema-level validation because the COMDat just binds to the global value 
address. I'll get a patch up to llvm::Triple to mark DXContainer as not 
supporting COMDat.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132977/new/

https://reviews.llvm.org/D132977

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to