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 | 4938ddb1ab7f423d14600768bf9322b358928396 (patch) | |
| tree | 8c65df6d0f736933e5991b727d24521a52154aec /clang/lib/Driver/Tools.cpp | |
| parent | 6eb32b31bd34dcafef8d89f298cad1b69767bbf0 (diff) | |
| download | bcm5719-llvm-4938ddb1ab7f423d14600768bf9322b358928396.tar.gz bcm5719-llvm-4938ddb1ab7f423d14600768bf9322b358928396.zip | |
[Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.
llvm-svn: 179981
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 1ea7c43efc7..119b7c76a4b 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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()) { |

