================ @@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, + In = 0b001, + Out = 0b010, + InOut = 0b011, + Preserves = 0b100 +}; + +unsigned encodeZAState(unsigned SMEAttrs) { + switch (SMEAttrs) { + case FunctionType::ARM_None: + return SMEState::None; + case FunctionType::ARM_In: + return SMEState::In; + case FunctionType::ARM_Out: + return SMEState::Out; + case FunctionType::ARM_InOut: + return SMEState::InOut; + case FunctionType::ARM_Preserves: + return SMEState::Preserves; + } + llvm_unreachable("Unrecognised SME attribute"); ---------------- sdesmalen-arm wrote:
This is missing a `default` (would otherwise result in warning diagnostic), you could move the `llvm_unreachable` under the `default` case. https://github.com/llvm/llvm-project/pull/114209 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits