[clang] [llvm] [ADT] Prepare for deprecation of StringSwitch cases with 3+ args. NFC. (PR #165112)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 25 11:17:13 PDT 2025
================
@@ -3533,10 +3533,10 @@ bool X86AsmParser::parseInstruction(ParseInstructionInfo &Info, StringRef Name,
while (isLockRepeatNtPrefix(Name.lower())) {
unsigned Prefix =
StringSwitch<unsigned>(Name)
- .Cases("lock", "lock", X86::IP_HAS_LOCK)
- .Cases("rep", "repe", "repz", X86::IP_HAS_REPEAT)
- .Cases("repne", "repnz", X86::IP_HAS_REPEAT_NE)
- .Cases("notrack", "notrack", X86::IP_HAS_NOTRACK)
+ .Cases({"lock", "lock"}, X86::IP_HAS_LOCK)
----------------
kuhar wrote:
Good catch, I demoted these to plain `.Case`.
https://github.com/llvm/llvm-project/pull/165112
More information about the llvm-commits
mailing list