[PATCH 1/5] Triple: Add AMDGPU evironment type
Tom Stellard
thomas.stellard at amd.com
Thu Nov 6 13:16:14 PST 2014
This will be used to tell the R600 backend how to emit program data
in its object files.
---
include/llvm/ADT/Triple.h | 1 +
lib/Support/Triple.cpp | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 4432390..c1b7882 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -155,6 +155,7 @@ public:
MSVC,
Itanium,
Cygnus,
+ AMDGPU
};
enum ObjectFormatType {
UnknownObjectFormat,
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index 7a9dc39..c9fc785 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -176,6 +176,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case MSVC: return "msvc";
case Itanium: return "itanium";
case Cygnus: return "cygnus";
+ case AMDGPU: return "amdgpu";
}
llvm_unreachable("Invalid EnvironmentType!");
@@ -326,6 +327,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
.StartsWith("msvc", Triple::MSVC)
.StartsWith("itanium", Triple::Itanium)
.StartsWith("cygnus", Triple::Cygnus)
+ .StartsWith("amdgpu", Triple::AMDGPU)
.Default(Triple::UnknownEnvironment);
}
--
1.8.5.5
More information about the llvm-commits
mailing list