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

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 07:28:56 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));
----------------
pow2clk wrote:

It wasn't necessary so much as redundant for the compilations I tested and actually gets applied to the LLVM function representation after that set by `setHLSLFunctionAttributes`.

How would I test a relevant separate compilation case? 

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


More information about the cfe-commits mailing list