From fcf4242b9b576da95213db4c50046f5d087adeab Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 2 Dec 2014 16:45:47 +0000 Subject: [PATCH] Triple: Add AMDHSA operating system type This operating system type represents the AMD HSA runtime, and will be required by the R600 backend in order to generate correct code for this runtime. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223124 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/Triple.h | 3 ++- lib/Support/Triple.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 107ba7364df..0932040ede7 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -138,7 +138,8 @@ public: Bitrig, AIX, CUDA, // NVIDIA CUDA - NVCL // NVIDIA OpenCL + NVCL, // NVIDIA OpenCL + AMDHSA // AMD HSA Runtime }; enum EnvironmentType { UnknownEnvironment, diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 4a4773e2f7e..64cd6e73e9e 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -157,6 +157,7 @@ const char *Triple::getOSTypeName(OSType Kind) { case AIX: return "aix"; case CUDA: return "cuda"; case NVCL: return "nvcl"; + case AMDHSA: return "amdhsa"; } llvm_unreachable("Invalid OSType"); @@ -345,6 +346,7 @@ static Triple::OSType parseOS(StringRef OSName) { .StartsWith("aix", Triple::AIX) .StartsWith("cuda", Triple::CUDA) .StartsWith("nvcl", Triple::NVCL) + .StartsWith("amdhsa", Triple::AMDHSA) .Default(Triple::UnknownOS); } -- 2.11.0