beanz added inline comments.
================ Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module &M = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) ---------------- python3kgae wrote: > Don't need to generate CtorCalls for lib profile in clang codeGen. > Have to do this when linking anyway. Are you sure? The global constructors contain the `createHandle` calls for resources, and DXC does currently generate those inside shader entries for lib shaders. I'm sure we're not generating those _correctly_ with this change, but I think we still need the constructor calls inside any function annotated with the `[shader(...)]` attribute. 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