[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 08:12:15 PST 2024


================
@@ -3536,35 +3536,64 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) {
   // FIXME: noreturn
 }
 
-bool hasSharedState(unsigned SMEAttrs) {
+unsigned getZAState(unsigned SMEAttrs) {
   switch (SMEAttrs) {
   case FunctionType::ARM_In:
+    return 1;
   case FunctionType::ARM_Out:
+    return 2;
   case FunctionType::ARM_InOut:
+    return 3;
   case FunctionType::ARM_Preserves:
-    return true;
+    return 4;
   default:
-    return false;
+    return 0;
----------------
sdesmalen-arm wrote:

I think only `case ARM_None` should return 0. Any other value (default) should be an `llvm_unreachable`.

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


More information about the cfe-commits mailing list