[lld] r282802 - Use StringSwitch::Cases. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 15:54:32 PDT 2016
Author: ruiu
Date: Thu Sep 29 17:54:31 2016
New Revision: 282802
URL: http://llvm.org/viewvc/llvm-project?rev=282802&view=rev
Log:
Use StringSwitch::Cases. NFC.
Modified:
lld/trunk/tools/lld/lld.cpp
Modified: lld/trunk/tools/lld/lld.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/lld.cpp?rev=282802&r1=282801&r2=282802&view=diff
==============================================================================
--- lld/trunk/tools/lld/lld.cpp (original)
+++ lld/trunk/tools/lld/lld.cpp Thu Sep 29 17:54:31 2016
@@ -43,9 +43,7 @@ LLVM_ATTRIBUTE_NORETURN static void die(
static Flavor getFlavor(StringRef S) {
return StringSwitch<Flavor>(S)
- .Case("ld", Gnu)
- .Case("ld.lld", Gnu)
- .Case("gnu", Gnu)
+ .Cases("ld", "ld.lld", "gnu", Gnu)
.Case("link", WinLink)
.Case("darwin", Darwin)
.Default(Invalid);
More information about the llvm-commits
mailing list