[PATCH] Save getArch() in a local var instead of calling it 20 times, etc.
Jonathan Roelofs
jonathan at codesourcery.com
Wed Jun 3 15:04:28 PDT 2015
LGTM with those fixes.
================
Comment at: lib/Driver/Tools.cpp:1659
@@ -1658,2 +1658,3 @@
+ llvm::Triple::ArchType ArchType = Triple.getArch();
// Add features to be compatible with gcc for Android.
----------------
const?
================
Comment at: lib/Driver/Tools.cpp:3880
@@ +3879,3 @@
+ if (const Arg *A = Args.getLastArg(options::OPT_faltivec)) {
+ llvm::Triple::ArchType Arch = getToolChain().getArch();
+ if (!(Arch == llvm::Triple::ppc || Arch == llvm::Triple::ppc64 ||
----------------
const?
================
Comment at: lib/Driver/Tools.cpp:7064
@@ -7062,2 +7063,3 @@
const Driver &D = ToolChain.getDriver();
+ llvm::Triple::ArchType Arch = ToolChain.getArch();
const bool IsPIE =
----------------
const?
================
Comment at: lib/Driver/Tools.cpp:7769
@@ -7767,1 +7768,3 @@
const toolchains::Linux &ToolChain) {
+ llvm::Triple::ArchType Arch = ToolChain.getArch();
+
----------------
const?
================
Comment at: lib/Driver/Tools.cpp:7816
@@ -7819,1 +7815,3 @@
+ else if (Arch == llvm::Triple::ppc64) {
+ if (ppc::hasPPCAbiArg(Args, "elfv2")) return "/lib64/ld64.so.2";
return "/lib64/ld64.so.1";
----------------
return should be on next line.
================
Comment at: lib/Driver/Tools.cpp:7819
@@ -7823,1 +7818,3 @@
+ } else if (Arch == llvm::Triple::ppc64le) {
+ if (ppc::hasPPCAbiArg(Args, "elfv1")) return "/lib64/ld64.so.1";
return "/lib64/ld64.so.2";
----------------
return should be on next line.
================
Comment at: lib/Driver/Tools.cpp:7939
@@ +7938,3 @@
+ if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb)
+ arm::appendEBLinkFlags(
+ Args, CmdArgs,
----------------
why are you changing the format of this line?
http://reviews.llvm.org/D10224
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list