From 05d71380181a874cbe70bd2c30fa5eb71eb0d661 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 29 Aug 2011 15:44:55 +0000 Subject: [PATCH] Add AMDIL as valid target triple to LLVM. Submitted by: Villmow, Micah git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138734 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/Triple.h | 1 + lib/Support/Triple.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 22d68a11d79..119c09d2621 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -64,6 +64,7 @@ public: ptx32, // PTX: ptx (32-bit) ptx64, // PTX: ptx (64-bit) le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) + amdil, // amdil: amd IL InvalidArch }; diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index af934ae3fa2..356bd89f5b7 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -39,6 +39,7 @@ const char *Triple::getArchTypeName(ArchType Kind) { case ptx32: return "ptx32"; case ptx64: return "ptx64"; case le32: return "le32"; + case amdil: return "amdil"; } return ""; @@ -73,8 +74,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) { case ptx32: return "ptx"; case ptx64: return "ptx"; - case le32: return "le32"; + case amdil: return "amdil"; } } @@ -176,6 +177,8 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) { return ptx64; if (Name == "le32") return le32; + if (Name == "amdil") + return amdil; return UnknownArch; } @@ -219,6 +222,8 @@ Triple::ArchType Triple::getArchTypeForDarwinArchName(StringRef Str) { return Triple::ptx32; if (Str == "ptx64") return Triple::ptx64; + if (Str == "amdil") + return Triple::amdil; return Triple::UnknownArch; } @@ -256,6 +261,8 @@ const char *Triple::getArchNameForAssembler() { return "ptx64"; if (Str == "le32") return "le32"; + if (Str == "amdil") + return "amdil"; return NULL; } @@ -311,6 +318,8 @@ Triple::ArchType Triple::ParseArch(StringRef ArchName) { return ptx64; else if (ArchName == "le32") return le32; + else if (ArchName == "amdil") + return amdil; else return UnknownArch; } -- 2.34.1