summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index d1017fb2a28..b56d1d9eff2 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -401,8 +401,8 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Case("msp430", Triple::msp430)
.Cases("mips", "mipseb", "mipsallegrex", Triple::mips)
.Cases("mipsel", "mipsallegrexel", Triple::mipsel)
- .Cases("mips64", "mips64eb", Triple::mips64)
- .Case("mips64el", Triple::mips64el)
+ .Cases("mips64", "mips64eb", "mipsn32", Triple::mips64)
+ .Cases("mips64el", "mipsn32el", Triple::mips64el)
.Case("nios2", Triple::nios2)
.Case("r600", Triple::r600)
.Case("amdgcn", Triple::amdgcn)
@@ -711,6 +711,14 @@ Triple::Triple(const Twine &Str)
ObjectFormat = parseFormat(Components[3]);
}
}
+ } else {
+ Environment = StringSwitch<Triple::EnvironmentType>(Components[0])
+ .StartsWith("mipsn32", Triple::GNUABIN32)
+ .StartsWith("mips64", Triple::GNUABI64)
+ .StartsWith("mipsisa64", Triple::GNUABI64)
+ .StartsWith("mipsisa32", Triple::GNU)
+ .Cases("mips", "mipsel", Triple::GNU)
+ .Default(UnknownEnvironment);
}
}
if (ObjectFormat == UnknownObjectFormat)
OpenPOWER on IntegriCloud