[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 09:03:35 PDT 2024


================
@@ -290,8 +290,6 @@ struct BuiltinTypeDeclBuilder {
                                              SourceLocation()));
     MethodDecl->setLexicalDeclContext(Record);
     MethodDecl->setAccess(AccessSpecifier::AS_public);
-    MethodDecl->addAttr(AlwaysInlineAttr::CreateImplicit(
-        AST, SourceRange(), AlwaysInlineAttr::CXX11_clang_always_inline));
----------------
pow3clk wrote:

Would that involve generating just AST then? The DXC analog would still be generating LLVM IR, which this setting would catch and does for the inline-constructors.hlsl test among others.

 As above, I care more about getting this in than disputing this. The setting here is at worst redundant.

https://github.com/llvm/llvm-project/pull/106588


More information about the cfe-commits mailing list