Skip to content

Commit 6d0d2d7

Browse files
committed
[ADT] Mark StringSwitch Cases 6+ arguments as deprecated. NFC.
Switch to the `.Cases({S0, S1, ...}, Value)` overload instead.
1 parent 45495b5 commit 6d0d2d7

File tree

21 files changed

+276
-239
lines changed

21 files changed

+276
-239
lines changed

clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ class AnalysisManager : public BugReporterData {
140140
// It might be great to reuse FrontendOptions::getInputKindForExtension()
141141
// but for now it doesn't discriminate between code and header files.
142142
return llvm::StringSwitch<bool>(SM.getFilename(SL).rsplit('.').second)
143-
.Cases("c", "m", "mm", "C", "cc", "cp", true)
144-
.Cases("cpp", "CPP", "c++", "cxx", "cppm", true)
143+
.Cases({"c", "m", "mm", "C", "cc", "cp"}, true)
144+
.Cases({"cpp", "CPP", "c++", "cxx", "cppm"}, true)
145145
.Default(false);
146146
}
147147

clang/lib/Basic/Targets/AVR.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -420,23 +420,23 @@ static MCUInfo AVRMcus[] = {
420420

421421
static bool ArchHasELPM(StringRef Arch) {
422422
return llvm::StringSwitch<bool>(Arch)
423-
.Cases("31", "51", "6", true)
424-
.Cases("102", "104", "105", "106", "107", true)
425-
.Default(false);
423+
.Cases({"31", "51", "6"}, true)
424+
.Cases({"102", "104", "105", "106", "107"}, true)
425+
.Default(false);
426426
}
427427

428428
static bool ArchHasELPMX(StringRef Arch) {
429429
return llvm::StringSwitch<bool>(Arch)
430-
.Cases("51", "6", true)
431-
.Cases("102", "104", "105", "106", "107", true)
432-
.Default(false);
430+
.Cases({"51", "6"}, true)
431+
.Cases({"102", "104", "105", "106", "107"}, true)
432+
.Default(false);
433433
}
434434

435435
static bool ArchHasMOVW(StringRef Arch) {
436436
return llvm::StringSwitch<bool>(Arch)
437-
.Cases("25", "35", "4", "5", "51", "6", true)
438-
.Cases("102", "103", "104", "105", "106", "107", true)
439-
.Default(false);
437+
.Cases({"25", "35", "4", "5", "51", "6"}, true)
438+
.Cases({"102", "103", "104", "105", "106", "107"}, true)
439+
.Default(false);
440440
}
441441

442442
static bool ArchHasLPMX(StringRef Arch) {
@@ -445,16 +445,16 @@ static bool ArchHasLPMX(StringRef Arch) {
445445

446446
static bool ArchHasMUL(StringRef Arch) {
447447
return llvm::StringSwitch<bool>(Arch)
448-
.Cases("4", "5", "51", "6", true)
449-
.Cases("102", "103", "104", "105", "106", "107", true)
450-
.Default(false);
448+
.Cases({"4", "5", "51", "6"}, true)
449+
.Cases({"102", "103", "104", "105", "106", "107"}, true)
450+
.Default(false);
451451
}
452452

453453
static bool ArchHasJMPCALL(StringRef Arch) {
454454
return llvm::StringSwitch<bool>(Arch)
455-
.Cases("3", "31", "35", "5", "51", "6", true)
456-
.Cases("102", "103", "104", "105", "106", "107", true)
457-
.Default(false);
455+
.Cases({"3", "31", "35", "5", "51", "6"}, true)
456+
.Cases({"102", "103", "104", "105", "106", "107"}, true)
457+
.Default(false);
458458
}
459459

460460
static bool ArchHas3BytePC(StringRef Arch) {

clang/lib/Driver/Job.cpp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,25 @@ static bool skipArgs(const char *Flag, bool HaveCrashVFS, int &SkipNum,
5757
SkipNum = 2;
5858
// These flags are all of the form -Flag <Arg> and are treated as two
5959
// arguments. Therefore, we need to skip the flag and the next argument.
60-
bool ShouldSkip = llvm::StringSwitch<bool>(Flag)
61-
.Cases("-MF", "-MT", "-MQ", "-serialize-diagnostic-file", true)
62-
.Cases("-o", "-dependency-file", true)
63-
.Cases("-fdebug-compilation-dir", "-diagnostic-log-file", true)
64-
.Cases("-dwarf-debug-flags", "-ivfsoverlay", true)
65-
.Default(false);
60+
bool ShouldSkip =
61+
llvm::StringSwitch<bool>(Flag)
62+
.Cases({"-MF", "-MT", "-MQ", "-serialize-diagnostic-file"}, true)
63+
.Cases({"-o", "-dependency-file"}, true)
64+
.Cases({"-fdebug-compilation-dir", "-diagnostic-log-file"}, true)
65+
.Cases({"-dwarf-debug-flags", "-ivfsoverlay"}, true)
66+
.Default(false);
6667
if (ShouldSkip)
6768
return true;
6869

6970
// Some include flags shouldn't be skipped if we have a crash VFS
7071
IsInclude =
7172
llvm::StringSwitch<bool>(Flag)
72-
.Cases("-include", "-header-include-file", true)
73-
.Cases("-idirafter", "-internal-isystem", "-iwithprefix", true)
74-
.Cases("-internal-externc-isystem", "-iprefix", true)
75-
.Cases("-iwithprefixbefore", "-isystem", "-iquote", true)
76-
.Cases("-isysroot", "-I", "-F", "-resource-dir", true)
77-
.Cases("-internal-iframework", "-iframework", "-include-pch", true)
73+
.Cases({"-include", "-header-include-file"}, true)
74+
.Cases({"-idirafter", "-internal-isystem", "-iwithprefix"}, true)
75+
.Cases({"-internal-externc-isystem", "-iprefix"}, true)
76+
.Cases({"-iwithprefixbefore", "-isystem", "-iquote"}, true)
77+
.Cases({"-isysroot", "-I", "-F", "-resource-dir"}, true)
78+
.Cases({"-internal-iframework", "-iframework", "-include-pch"}, true)
7879
.Default(false);
7980
if (IsInclude)
8081
return !HaveCrashVFS;
@@ -83,9 +84,9 @@ static bool skipArgs(const char *Flag, bool HaveCrashVFS, int &SkipNum,
8384

8485
// These flags are all of the form -Flag and have no second argument.
8586
ShouldSkip = llvm::StringSwitch<bool>(Flag)
86-
.Cases("-M", "-MM", "-MG", "-MP", "-MD", true)
87-
.Case("-MMD", true)
88-
.Default(false);
87+
.Cases({"-M", "-MM", "-MG", "-MP", "-MD"}, true)
88+
.Case("-MMD", true)
89+
.Default(false);
8990

9091
// Match found.
9192
SkipNum = 1;

clang/lib/Frontend/FrontendOptions.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@ using namespace clang;
1414

1515
InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) {
1616
return llvm::StringSwitch<InputKind>(Extension)
17-
.Cases("ast", "pcm", InputKind(Language::Unknown, InputKind::Precompiled))
17+
.Cases({"ast", "pcm"},
18+
InputKind(Language::Unknown, InputKind::Precompiled))
1819
.Case("c", Language::C)
19-
.Cases("S", "s", Language::Asm)
20+
.Cases({"S", "s"}, Language::Asm)
2021
.Case("i", InputKind(Language::C).getPreprocessed())
2122
.Case("ii", InputKind(Language::CXX).getPreprocessed())
2223
.Case("cui", InputKind(Language::CUDA).getPreprocessed())
2324
.Case("m", Language::ObjC)
2425
.Case("mi", InputKind(Language::ObjC).getPreprocessed())
25-
.Cases("mm", "M", Language::ObjCXX)
26+
.Cases({"mm", "M"}, Language::ObjCXX)
2627
.Case("mii", InputKind(Language::ObjCXX).getPreprocessed())
27-
.Cases("C", "cc", "cp", Language::CXX)
28-
.Cases("cpp", "CPP", "c++", "cxx", "hpp", "hxx", Language::CXX)
28+
.Cases({"C", "cc", "cp"}, Language::CXX)
29+
.Cases({"cpp", "CPP", "c++", "cxx", "hpp", "hxx"}, Language::CXX)
2930
.Case("cppm", Language::CXX)
30-
.Cases("iim", "iih", InputKind(Language::CXX).getPreprocessed())
31+
.Cases({"iim", "iih"}, InputKind(Language::CXX).getPreprocessed())
3132
.Case("cl", Language::OpenCL)
3233
.Case("clcpp", Language::OpenCLCXX)
33-
.Cases("cu", "cuh", Language::CUDA)
34+
.Cases({"cu", "cuh"}, Language::CUDA)
3435
.Case("hip", Language::HIP)
35-
.Cases("ll", "bc", Language::LLVM_IR)
36+
.Cases({"ll", "bc"}, Language::LLVM_IR)
3637
.Case("hlsl", Language::HLSL)
3738
.Case("cir", Language::CIR)
3839
.Default(Language::Unknown);

clang/lib/InstallAPI/HeaderFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ std::optional<std::string> createIncludeHeaderName(const StringRef FullPath) {
3838

3939
bool isHeaderFile(StringRef Path) {
4040
return StringSwitch<bool>(sys::path::extension(Path))
41-
.Cases(".h", ".H", ".hh", ".hpp", ".hxx", true)
41+
.Cases({".h", ".H", ".hh", ".hpp", ".hxx"}, true)
4242
.Default(false);
4343
}
4444

clang/lib/Lex/PPDirectives.cpp

Lines changed: 61 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -248,50 +248,67 @@ static bool warnByDefaultOnWrongCase(StringRef Include) {
248248

249249
// The standard C/C++ and Posix headers
250250
return llvm::StringSwitch<bool>(LowerInclude)
251-
// C library headers
252-
.Cases("assert.h", "complex.h", "ctype.h", "errno.h", "fenv.h", true)
253-
.Cases("float.h", "inttypes.h", "iso646.h", "limits.h", "locale.h", true)
254-
.Cases("math.h", "setjmp.h", "signal.h", "stdalign.h", "stdarg.h", true)
255-
.Cases("stdatomic.h", "stdbool.h", "stdckdint.h", "stdcountof.h", true)
256-
.Cases("stddef.h", "stdint.h", "stdio.h", "stdlib.h", "stdnoreturn.h", true)
257-
.Cases("string.h", "tgmath.h", "threads.h", "time.h", "uchar.h", true)
258-
.Cases("wchar.h", "wctype.h", true)
259-
260-
// C++ headers for C library facilities
261-
.Cases("cassert", "ccomplex", "cctype", "cerrno", "cfenv", true)
262-
.Cases("cfloat", "cinttypes", "ciso646", "climits", "clocale", true)
263-
.Cases("cmath", "csetjmp", "csignal", "cstdalign", "cstdarg", true)
264-
.Cases("cstdbool", "cstddef", "cstdint", "cstdio", "cstdlib", true)
265-
.Cases("cstring", "ctgmath", "ctime", "cuchar", "cwchar", true)
266-
.Case("cwctype", true)
267-
268-
// C++ library headers
269-
.Cases("algorithm", "fstream", "list", "regex", "thread", true)
270-
.Cases("array", "functional", "locale", "scoped_allocator", "tuple", true)
271-
.Cases("atomic", "future", "map", "set", "type_traits", true)
272-
.Cases("bitset", "initializer_list", "memory", "shared_mutex", "typeindex", true)
273-
.Cases("chrono", "iomanip", "mutex", "sstream", "typeinfo", true)
274-
.Cases("codecvt", "ios", "new", "stack", "unordered_map", true)
275-
.Cases("complex", "iosfwd", "numeric", "stdexcept", "unordered_set", true)
276-
.Cases("condition_variable", "iostream", "ostream", "streambuf", "utility", true)
277-
.Cases("deque", "istream", "queue", "string", "valarray", true)
278-
.Cases("exception", "iterator", "random", "strstream", "vector", true)
279-
.Cases("forward_list", "limits", "ratio", "system_error", true)
280-
281-
// POSIX headers (which aren't also C headers)
282-
.Cases("aio.h", "arpa/inet.h", "cpio.h", "dirent.h", "dlfcn.h", true)
283-
.Cases("fcntl.h", "fmtmsg.h", "fnmatch.h", "ftw.h", "glob.h", true)
284-
.Cases("grp.h", "iconv.h", "langinfo.h", "libgen.h", "monetary.h", true)
285-
.Cases("mqueue.h", "ndbm.h", "net/if.h", "netdb.h", "netinet/in.h", true)
286-
.Cases("netinet/tcp.h", "nl_types.h", "poll.h", "pthread.h", "pwd.h", true)
287-
.Cases("regex.h", "sched.h", "search.h", "semaphore.h", "spawn.h", true)
288-
.Cases("strings.h", "stropts.h", "sys/ipc.h", "sys/mman.h", "sys/msg.h", true)
289-
.Cases("sys/resource.h", "sys/select.h", "sys/sem.h", "sys/shm.h", "sys/socket.h", true)
290-
.Cases("sys/stat.h", "sys/statvfs.h", "sys/time.h", "sys/times.h", "sys/types.h", true)
291-
.Cases("sys/uio.h", "sys/un.h", "sys/utsname.h", "sys/wait.h", "syslog.h", true)
292-
.Cases("tar.h", "termios.h", "trace.h", "ulimit.h", true)
293-
.Cases("unistd.h", "utime.h", "utmpx.h", "wordexp.h", true)
294-
.Default(false);
251+
// C library headers
252+
.Cases({"assert.h", "complex.h", "ctype.h", "errno.h", "fenv.h"}, true)
253+
.Cases({"float.h", "inttypes.h", "iso646.h", "limits.h", "locale.h"},
254+
true)
255+
.Cases({"math.h", "setjmp.h", "signal.h", "stdalign.h", "stdarg.h"}, true)
256+
.Cases({"stdatomic.h", "stdbool.h", "stdckdint.h", "stdcountof.h"}, true)
257+
.Cases({"stddef.h", "stdint.h", "stdio.h", "stdlib.h", "stdnoreturn.h"},
258+
true)
259+
.Cases({"string.h", "tgmath.h", "threads.h", "time.h", "uchar.h"}, true)
260+
.Cases({"wchar.h", "wctype.h"}, true)
261+
262+
// C++ headers for C library facilities
263+
.Cases({"cassert", "ccomplex", "cctype", "cerrno", "cfenv"}, true)
264+
.Cases({"cfloat", "cinttypes", "ciso646", "climits", "clocale"}, true)
265+
.Cases({"cmath", "csetjmp", "csignal", "cstdalign", "cstdarg"}, true)
266+
.Cases({"cstdbool", "cstddef", "cstdint", "cstdio", "cstdlib"}, true)
267+
.Cases({"cstring", "ctgmath", "ctime", "cuchar", "cwchar"}, true)
268+
.Case("cwctype", true)
269+
270+
// C++ library headers
271+
.Cases({"algorithm", "fstream", "list", "regex", "thread"}, true)
272+
.Cases({"array", "functional", "locale", "scoped_allocator", "tuple"},
273+
true)
274+
.Cases({"atomic", "future", "map", "set", "type_traits"}, true)
275+
.Cases(
276+
{"bitset", "initializer_list", "memory", "shared_mutex", "typeindex"},
277+
true)
278+
.Cases({"chrono", "iomanip", "mutex", "sstream", "typeinfo"}, true)
279+
.Cases({"codecvt", "ios", "new", "stack", "unordered_map"}, true)
280+
.Cases({"complex", "iosfwd", "numeric", "stdexcept", "unordered_set"},
281+
true)
282+
.Cases(
283+
{"condition_variable", "iostream", "ostream", "streambuf", "utility"},
284+
true)
285+
.Cases({"deque", "istream", "queue", "string", "valarray"}, true)
286+
.Cases({"exception", "iterator", "random", "strstream", "vector"}, true)
287+
.Cases({"forward_list", "limits", "ratio", "system_error"}, true)
288+
289+
// POSIX headers (which aren't also C headers)
290+
.Cases({"aio.h", "arpa/inet.h", "cpio.h", "dirent.h", "dlfcn.h"}, true)
291+
.Cases({"fcntl.h", "fmtmsg.h", "fnmatch.h", "ftw.h", "glob.h"}, true)
292+
.Cases({"grp.h", "iconv.h", "langinfo.h", "libgen.h", "monetary.h"}, true)
293+
.Cases({"mqueue.h", "ndbm.h", "net/if.h", "netdb.h", "netinet/in.h"},
294+
true)
295+
.Cases({"netinet/tcp.h", "nl_types.h", "poll.h", "pthread.h", "pwd.h"},
296+
true)
297+
.Cases({"regex.h", "sched.h", "search.h", "semaphore.h", "spawn.h"}, true)
298+
.Cases({"strings.h", "stropts.h", "sys/ipc.h", "sys/mman.h", "sys/msg.h"},
299+
true)
300+
.Cases({"sys/resource.h", "sys/select.h", "sys/sem.h", "sys/shm.h",
301+
"sys/socket.h"},
302+
true)
303+
.Cases({"sys/stat.h", "sys/statvfs.h", "sys/time.h", "sys/times.h",
304+
"sys/types.h"},
305+
true)
306+
.Cases(
307+
{"sys/uio.h", "sys/un.h", "sys/utsname.h", "sys/wait.h", "syslog.h"},
308+
true)
309+
.Cases({"tar.h", "termios.h", "trace.h", "ulimit.h"}, true)
310+
.Cases({"unistd.h", "utime.h", "utmpx.h", "wordexp.h"}, true)
311+
.Default(false);
295312
}
296313

297314
/// Find a similar string in `Candidates`.

clang/lib/Sema/CheckExprLifetime.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,11 @@ static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) {
361361
if (!Callee->getIdentifier())
362362
return false;
363363
return llvm::StringSwitch<bool>(Callee->getName())
364-
.Cases("begin", "rbegin", "cbegin", "crbegin", true)
365-
.Cases("end", "rend", "cend", "crend", true)
366-
.Cases("c_str", "data", "get", true)
364+
.Cases({"begin", "rbegin", "cbegin", "crbegin"}, true)
365+
.Cases({"end", "rend", "cend", "crend"}, true)
366+
.Cases({"c_str", "data", "get"}, true)
367367
// Map and set types.
368-
.Cases("find", "equal_range", "lower_bound", "upper_bound", true)
368+
.Cases({"find", "equal_range", "lower_bound", "upper_bound"}, true)
369369
.Default(false);
370370
}
371371
if (Callee->getReturnType()->isReferenceType()) {
@@ -377,7 +377,7 @@ static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) {
377377
OO == OverloadedOperatorKind::OO_Star;
378378
}
379379
return llvm::StringSwitch<bool>(Callee->getName())
380-
.Cases("front", "back", "at", "top", "value", true)
380+
.Cases({"front", "back", "at", "top", "value"}, true)
381381
.Default(false);
382382
}
383383
return false;
@@ -394,14 +394,14 @@ static bool shouldTrackFirstArgument(const FunctionDecl *FD) {
394394
if (FD->getReturnType()->isPointerType() ||
395395
isRecordWithAttr<PointerAttr>(FD->getReturnType())) {
396396
return llvm::StringSwitch<bool>(FD->getName())
397-
.Cases("begin", "rbegin", "cbegin", "crbegin", true)
398-
.Cases("end", "rend", "cend", "crend", true)
397+
.Cases({"begin", "rbegin", "cbegin", "crbegin"}, true)
398+
.Cases({"end", "rend", "cend", "crend"}, true)
399399
.Case("data", true)
400400
.Default(false);
401401
}
402402
if (FD->getReturnType()->isReferenceType()) {
403403
return llvm::StringSwitch<bool>(FD->getName())
404-
.Cases("get", "any_cast", true)
404+
.Cases({"get", "any_cast"}, true)
405405
.Default(false);
406406
}
407407
return false;

clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
154154
.Case("mkstemp", &WalkAST::checkCall_mkstemp)
155155
.Case("mkdtemp", &WalkAST::checkCall_mkstemp)
156156
.Case("mkstemps", &WalkAST::checkCall_mkstemp)
157-
.Cases("strcpy", "__strcpy_chk", &WalkAST::checkCall_strcpy)
158-
.Cases("strcat", "__strcat_chk", &WalkAST::checkCall_strcat)
159-
.Cases("sprintf", "vsprintf", "scanf", "wscanf", "fscanf", "fwscanf",
160-
"vscanf", "vwscanf", "vfscanf", "vfwscanf",
157+
.Cases({"strcpy", "__strcpy_chk"}, &WalkAST::checkCall_strcpy)
158+
.Cases({"strcat", "__strcat_chk"}, &WalkAST::checkCall_strcat)
159+
.Cases({"sprintf", "vsprintf", "scanf", "wscanf", "fscanf", "fwscanf",
160+
"vscanf", "vwscanf", "vfscanf", "vfwscanf"},
161161
&WalkAST::checkDeprecatedOrUnsafeBufferHandling)
162-
.Cases("sscanf", "swscanf", "vsscanf", "vswscanf", "swprintf",
163-
"snprintf", "vswprintf", "vsnprintf", "memcpy", "memmove",
162+
.Cases({"sscanf", "swscanf", "vsscanf", "vswscanf", "swprintf",
163+
"snprintf", "vswprintf", "vsnprintf", "memcpy", "memmove"},
164164
&WalkAST::checkDeprecatedOrUnsafeBufferHandling)
165-
.Cases("strncpy", "strncat", "memset", "fprintf",
165+
.Cases({"strncpy", "strncat", "memset", "fprintf"},
166166
&WalkAST::checkDeprecatedOrUnsafeBufferHandling)
167167
.Case("drand48", &WalkAST::checkCall_rand)
168168
.Case("erand48", &WalkAST::checkCall_rand)
@@ -766,11 +766,11 @@ void WalkAST::checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE,
766766

767767
int ArgIndex =
768768
llvm::StringSwitch<int>(Name)
769-
.Cases("scanf", "wscanf", "vscanf", "vwscanf", 0)
770-
.Cases("fscanf", "fwscanf", "vfscanf", "vfwscanf", "sscanf",
769+
.Cases({"scanf", "wscanf", "vscanf", "vwscanf"}, 0)
770+
.Cases({"fscanf", "fwscanf", "vfscanf", "vfwscanf", "sscanf"},
771771
"swscanf", "vsscanf", "vswscanf", 1)
772-
.Cases("sprintf", "vsprintf", "fprintf", 1)
773-
.Cases("swprintf", "snprintf", "vswprintf", "vsnprintf", "memcpy",
772+
.Cases({"sprintf", "vsprintf", "fprintf"}, 1)
773+
.Cases({"swprintf", "snprintf", "vswprintf", "vsnprintf", "memcpy"},
774774
"memmove", "memset", "strncpy", "strncat", DEPR_ONLY)
775775
.Default(UNKNOWN_CALL);
776776

lldb/source/Plugins/ABI/LoongArch/ABISysV_loongarch.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,16 @@ bool ABISysV_loongarch::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
597597

598598
return llvm::StringSwitch<bool>(name)
599599
// integer ABI names
600-
.Cases("ra", "sp", "fp", true)
601-
.Cases("s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", true)
600+
.Cases({"ra", "sp", "fp"}, true)
601+
.Cases({"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9"}, true)
602602
// integer hardware names
603-
.Cases("r1", "r3", "r22", true)
604-
.Cases("r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "31", true)
603+
.Cases({"r1", "r3", "r22"}, true)
604+
.Cases({"r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "31"},
605+
true)
605606
// floating point ABI names
606-
.Cases("fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7", is_hw_fp)
607+
.Cases({"fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7"}, is_hw_fp)
607608
// floating point hardware names
608-
.Cases("f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", is_hw_fp)
609+
.Cases({"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"}, is_hw_fp)
609610
.Default(false);
610611
}
611612

0 commit comments

Comments
 (0)