mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
[mips] Treat -mcpu=generic the same way as an empty CPU string.
Summary: This should fix the MCJIT unit tests that were broken by r201792 on the MIPS buildbot. MIPS currently uses the default implementation of sys::getHostCPUName() which always returns "generic". For now, we will accept "generic" and coerce it to "mips32" or "mips64" depending on the target architecture like we do for empty CPU names. Reviewers: jacksprat, matheusalmeida Reviewed By: jacksprat Differential Revision: http://llvm-reviews.chandlerc.com/D2878 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b442bffcb
commit
f6679de299
@ -42,7 +42,7 @@ using namespace llvm;
|
||||
/// Select the Mips CPU for the given triple and cpu name.
|
||||
/// FIXME: Merge with the copy in MipsSubtarget.cpp
|
||||
static inline StringRef selectMipsCPU(StringRef TT, StringRef CPU) {
|
||||
if (CPU.empty()) {
|
||||
if (CPU.empty() || CPU == "generic") {
|
||||
Triple TheTriple(TT);
|
||||
if (TheTriple.getArch() == Triple::mips ||
|
||||
TheTriple.getArch() == Triple::mipsel)
|
||||
|
@ -62,7 +62,7 @@ Mips16ConstantIslands(
|
||||
/// Select the Mips CPU for the given triple and cpu name.
|
||||
/// FIXME: Merge with the copy in MipsMCTargetDesc.cpp
|
||||
static inline StringRef selectMipsCPU(StringRef TT, StringRef CPU) {
|
||||
if (CPU.empty()) {
|
||||
if (CPU.empty() || CPU == "generic") {
|
||||
Triple TheTriple(TT);
|
||||
if (TheTriple.getArch() == Triple::mips ||
|
||||
TheTriple.getArch() == Triple::mipsel)
|
||||
|
Loading…
Reference in New Issue
Block a user