[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 06:57:20 PST 2024


================
@@ -3145,7 +3138,7 @@ bool Sema::ParseSVEImmChecks(
   return HasError;
 }
 
-static ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) {
+Sema::ArmStreamingType Sema::getArmStreamingFnType(const FunctionDecl *FD) {
----------------
sdesmalen-arm wrote:

I don't think this function is worth changing the build configuration to add a dependence of clang::Sema to clang::CodeGen :)

You can just inline (duplicate) the functionality here directly into your function in `AArch64TargetCodeGenInfo::checkFunctionCallABI` and map the attributes directly to the `llvm::AArch64::SMEAttrs` class.

That way you can also avoid needing the `ArmStreamingType` enum.

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


More information about the cfe-commits mailing list