r200667 - Replace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
Joerg Sonnenberger
joerg at bec.de
Sun Feb 2 14:54:18 PST 2014
Author: joerg
Date: Sun Feb 2 16:54:18 2014
New Revision: 200667
URL: http://llvm.org/viewvc/llvm-project?rev=200667&view=rev
Log:
Replace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
support.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=200667&r1=200666&r2=200667&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sun Feb 2 16:54:18 2014
@@ -1546,9 +1546,9 @@ static bool isMipsNan2008(const ArgList
}
// FIXME: There is the same routine in the Tools.cpp.
-static bool hasMipsN32ABIArg(const ArgList &Args) {
+static bool hasMipsABIArg(const ArgList &Args, const char *Value) {
Arg *A = Args.getLastArg(options::OPT_mabi_EQ);
- return A && (A->getValue() == StringRef("n32"));
+ return A && (A->getValue() == StringRef(Value));
}
static bool hasCrtBeginObj(Twine Path) {
@@ -1561,7 +1561,7 @@ static bool findTargetBiarchSuffix(std::
// FIXME: This routine was only intended to model bi-arch toolchains which
// use -m32 and -m64 to swap between variants of a target. It shouldn't be
// doing ABI-based builtin location for MIPS.
- if (hasMipsN32ABIArg(Args))
+ if (hasMipsABIArg(Args, "n32"))
Suffix = "/n32";
else if (TargetArch == llvm::Triple::x86_64 ||
TargetArch == llvm::Triple::ppc64 ||
@@ -1619,9 +1619,9 @@ void Generic_GCC::GCCInstallationDetecto
Suffix += "/mips16";
} else {
if (isMips64r2(Args))
- Suffix += hasMipsN32ABIArg(Args) ? "/mips64r2" : "/mips64r2/64";
+ Suffix += hasMipsABIArg(Args, "n32") ? "/mips64r2" : "/mips64r2/64";
else
- Suffix += hasMipsN32ABIArg(Args) ? "/mips64" : "/mips64/64";
+ Suffix += hasMipsABIArg(Args, "n32") ? "/mips64" : "/mips64/64";
}
if (TargetArch == llvm::Triple::mipsel ||
@@ -2565,7 +2565,7 @@ static StringRef getMultilibDir(const ll
// lib32 directory has a special meaning on MIPS targets.
// It contains N32 ABI binaries. Use this folder if produce
// code for N32 ABI only.
- if (hasMipsN32ABIArg(Args))
+ if (hasMipsABIArg(Args, "n32"))
return "lib32";
return Triple.isArch32Bit() ? "lib" : "lib64";
}
More information about the cfe-commits
mailing list