]> granicus.if.org Git - clang/commitdiff
Simple refactoring to eliminate single-use local variable
authorBernard Ogden <bogden@arm.com>
Thu, 12 Dec 2013 13:27:15 +0000 (13:27 +0000)
committerBernard Ogden <bogden@arm.com>
Thu, 12 Dec 2013 13:27:15 +0000 (13:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197154 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 04f8e8ca5f8e6ebdf59acb55235e9859ca8f24fa..74cd393775207af5c6ba1254ed6d28a8b61695f6 100644 (file)
@@ -4466,14 +4466,12 @@ const char *arm::getARMCPUForMArch(const ArgList &Args,
   }
 
   // Handle -march=native.
-  std::string NativeMArch;
   if (MArch == "native") {
     std::string CPU = llvm::sys::getHostCPUName();
     if (CPU != "generic") {
       // Translate the native cpu into the architecture. The switch below will
       // then chose the minimum cpu for that arch.
-      NativeMArch = std::string("arm") + arm::getLLVMArchSuffixForARM(CPU);
-      MArch = NativeMArch;
+      MArch = std::string("arm") + arm::getLLVMArchSuffixForARM(CPU);
     }
   }