diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2013-10-09 12:12:39 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2013-10-09 12:12:39 +0000 |
commit | 068e0fd52ea6b3c93f77a7ce89a9913970959b20 (patch) | |
tree | c2b867ffe639b62fdb2b41ae5f15f1d15ff14a86 /clang/lib | |
parent | 6736ad1222f1a051d41789544eb8d8e8ad6a23ec (diff) | |
download | bcm5719-llvm-068e0fd52ea6b3c93f77a7ce89a9913970959b20.tar.gz bcm5719-llvm-068e0fd52ea6b3c93f77a7ce89a9913970959b20.zip |
[Mips] Group MIPS-related options checking function in one place.
llvm-svn: 192293
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 48e5089c980..83345c5bcd1 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1294,6 +1294,13 @@ static bool isMips16(const ArgList &Args) { return A && A->getOption().matches(options::OPT_mips16); } +static bool isMips32r2(const ArgList &Args) { + Arg *A = Args.getLastArg(options::OPT_march_EQ, + options::OPT_mcpu_EQ); + + return A && A->getValue() == StringRef("mips32r2"); +} + static bool isMicroMips(const ArgList &Args) { Arg *A = Args.getLastArg(options::OPT_mmicromips, options::OPT_mno_micromips); @@ -2174,13 +2181,6 @@ static void addPathIfExists(Twine Path, ToolChain::path_list &Paths) { if (llvm::sys::fs::exists(Path)) Paths.push_back(Path.str()); } -static bool isMipsR2Arch(const ArgList &Args) { - Arg *A = Args.getLastArg(options::OPT_march_EQ, - options::OPT_mcpu_EQ); - - return A && A->getValue() == StringRef("mips32r2"); -} - static StringRef getMultilibDir(const llvm::Triple &Triple, const ArgList &Args) { if (!isMipsArch(Triple.getArch())) @@ -2276,7 +2276,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) // the parent prefix of the GCC installation. // FIXME: It would be cleaner to model this as a variant of multilib. IE, // instead of 'lib64' it would be 'lib/el'. - if (IsAndroid && IsMips && isMipsR2Arch(Args)) { + if (IsAndroid && IsMips && isMips32r2(Args)) { assert(GCCInstallation.getBiarchSuffix().empty() && "Unexpected bi-arch suffix"); addPathIfExists(GCCInstallation.getInstallPath() + "/mips-r2", Paths); |