================
@@ -2471,11 +2471,14 @@ void
CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
B.addAttribute(llvm::Attribute::StackProtectReq);
if (!D) {
+ // HLSL functions must always be inlined
+ if (getLangOpts().HLSL && !F->hasFnAttribute("hlsl.shader"))
----------------
llvm-beanz wrote:
What if we put `noinline` on the entry function? Does that simplify this logic?
Since we'll also at some point need to support the `noinline` keyword we'll
need to be checking that attribute somewhere.
https://github.com/llvm/llvm-project/pull/106588
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits