[PATCH] Simple refactoring to eliminate single-use local variable
Bernard Ogden
bernard.ogden at arm.com
Thu Nov 21 08:22:16 PST 2013
Get rid of NativeMARch
Depends on D2243
http://llvm-reviews.chandlerc.com/D2244
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") + getLLVMArchSuffixForARM(CPU);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2244.1.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131121/497d710f/attachment.bin>
More information about the cfe-commits
mailing list