[PATCH] Simple refactoring to eliminate single-use local variable

Bernard Ogden bernard.ogden at arm.com
Thu Nov 21 08:28:09 PST 2013


  Corrected missing namespace specifier

http://llvm-reviews.chandlerc.com/D2244

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2244?vs=5711&id=5712#toc

Files:
  lib/Driver/Tools.cpp

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -4454,14 +4454,12 @@
   }
 
   // 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);
     }
   }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2244.2.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131121/7ae6b1c6/attachment.bin>


More information about the cfe-commits mailing list