From e1194bdb4f665ea525ee2b5bfa266403e5ea0fcd Mon Sep 17 00:00:00 2001 From: Michael Kuperstein Date: Tue, 27 Oct 2015 07:23:59 +0000 Subject: [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 --- llvm/lib/Support/Triple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/Triple.cpp') 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); } -- cgit v1.1