From: Tom Stellard Date: Tue, 2 Dec 2014 16:45:47 +0000 (+0000) Subject: Triple: Add AMDHSA operating system type X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fcf4242b9b576da95213db4c50046f5d087adeab;p=oota-llvm.git 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 --- 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); }