r197154 - Simple refactoring to eliminate single-use local variable
Bernard Ogden
bogden at arm.com
Thu Dec 12 05:27:15 PST 2013
Author: bogden
Date: Thu Dec 12 07:27:15 2013
New Revision: 197154
URL: http://llvm.org/viewvc/llvm-project?rev=197154&view=rev
Log:
Simple refactoring to eliminate single-use local variable
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=197154&r1=197153&r2=197154&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec 12 07:27:15 2013
@@ -4466,14 +4466,12 @@ const char *arm::getARMCPUForMArch(const
}
// 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);
}
}
More information about the cfe-commits
mailing list