diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2013-04-21 13:30:10 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2013-04-21 13:30:10 +0000 |
commit | c7e2a4e08a14ff04de41146c418b71cd577c0a0d (patch) | |
tree | e981478a442863c9b4ff0a6806690bced2fb3271 /lib/Driver/Tools.cpp | |
parent | 990b5e5be5e60e91cab2134d7f37a0ba70f727c2 (diff) |
[Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 1ea7c43efc..119b7c76a4 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -853,8 +853,15 @@ static void getMipsCPUAndABI(const ArgList &Args, CPUName = A->getValue(); } - if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) + if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) { ABIName = A->getValue(); + // Convert a GNU style Mips ABI name to the name + // accepted by LLVM Mips backend. + ABIName = llvm::StringSwitch<llvm::StringRef>(ABIName) + .Case("32", "o32") + .Case("64", "n64") + .Default(ABIName); + } // Setup default CPU and ABI names. if (CPUName.empty() && ABIName.empty()) { |