aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2015-10-27 07:23:59 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2015-10-27 07:23:59 +0000
commite1194bdb4f665ea525ee2b5bfa266403e5ea0fcd (patch)
tree29819139f07e75901e5a6e5b624f00d031bf236d /llvm/lib/Support/Triple.cpp
parent99af5b2ea7d25f44edeb9182b926943b4666f713 (diff)
downloadllvm-e1194bdb4f665ea525ee2b5bfa266403e5ea0fcd.zip
llvm-e1194bdb4f665ea525ee2b5bfa266403e5ea0fcd.tar.gz
llvm-e1194bdb4f665ea525ee2b5bfa266403e5ea0fcd.tar.bz2
[X86] Make elfiamcu an OS, not an environment.
GNU tools require elfiamcu to take up the entire OS field, so, e.g. i?86-*-linux-elfiamcu is not considered a legal triple. Make us compatible. Differential Revision: http://reviews.llvm.org/D14081 llvm-svn: 251390
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index f3b3de7..142a9b9 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -181,6 +181,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
case NVCL: return "nvcl";
case AMDHSA: return "amdhsa";
case PS4: return "ps4";
+ case ELFIAMCU: return "elfiamcu";
}
llvm_unreachable("Invalid OSType");
@@ -202,7 +203,6 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case Cygnus: return "cygnus";
case AMDOpenCL: return "amdopencl";
case CoreCLR: return "coreclr";
- case ELFIAMCU: return "elfiamcu";
}
llvm_unreachable("Invalid EnvironmentType!");
@@ -436,6 +436,7 @@ static Triple::OSType parseOS(StringRef OSName) {
.StartsWith("nvcl", Triple::NVCL)
.StartsWith("amdhsa", Triple::AMDHSA)
.StartsWith("ps4", Triple::PS4)
+ .StartsWith("elfiamcu", Triple::ELFIAMCU)
.Default(Triple::UnknownOS);
}
@@ -454,7 +455,6 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
.StartsWith("cygnus", Triple::Cygnus)
.StartsWith("amdopencl", Triple::AMDOpenCL)
.StartsWith("coreclr", Triple::CoreCLR)
- .StartsWith("elfiamcu", Triple::ELFIAMCU)
.Default(Triple::UnknownEnvironment);
}