]> granicus.if.org Git - clang/commitdiff
Change big 'if' statement into a switch. NFC
authorDouglas Katzman <dougk@google.com>
Wed, 3 Jun 2015 19:40:30 +0000 (19:40 +0000)
committerDouglas Katzman <dougk@google.com>
Wed, 3 Jun 2015 19:40:30 +0000 (19:40 +0000)
Differential Revision: http://reviews.llvm.org/D10223

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238955 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 076161e7223212716cc43d1ff1530390c9184b4d..037b91e1fa38dc3d13c0f25753f0daaffa5a4b95 100644 (file)
@@ -2077,21 +2077,26 @@ bool Generic_GCC::isPICDefaultForced() const {
 }
 
 bool Generic_GCC::IsIntegratedAssemblerDefault() const {
-  return getTriple().getArch() == llvm::Triple::x86 ||
-         getTriple().getArch() == llvm::Triple::x86_64 ||
-         getTriple().getArch() == llvm::Triple::aarch64 ||
-         getTriple().getArch() == llvm::Triple::aarch64_be ||
-         getTriple().getArch() == llvm::Triple::arm ||
-         getTriple().getArch() == llvm::Triple::armeb ||
-         getTriple().getArch() == llvm::Triple::thumb ||
-         getTriple().getArch() == llvm::Triple::thumbeb ||
-         getTriple().getArch() == llvm::Triple::ppc ||
-         getTriple().getArch() == llvm::Triple::ppc64 ||
-         getTriple().getArch() == llvm::Triple::ppc64le ||
-         getTriple().getArch() == llvm::Triple::sparc ||
-         getTriple().getArch() == llvm::Triple::sparcel ||
-         getTriple().getArch() == llvm::Triple::sparcv9 ||
-         getTriple().getArch() == llvm::Triple::systemz;
+  switch (getTriple().getArch()) {
+  case llvm::Triple::x86:
+  case llvm::Triple::x86_64:
+  case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_be:
+  case llvm::Triple::arm:
+  case llvm::Triple::armeb:
+  case llvm::Triple::thumb:
+  case llvm::Triple::thumbeb:
+  case llvm::Triple::ppc:
+  case llvm::Triple::ppc64:
+  case llvm::Triple::ppc64le:
+  case llvm::Triple::sparc:
+  case llvm::Triple::sparcel:
+  case llvm::Triple::sparcv9:
+  case llvm::Triple::systemz:
+    return true;
+  default:
+    return false;
+  }
 }
 
 void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs,