diff options
author | Ivan Krasin <krasin@chromium.org> | 2011-08-23 16:59:00 +0000 |
---|---|---|
committer | Ivan Krasin <krasin@chromium.org> | 2011-08-23 16:59:00 +0000 |
commit | 38fb2db6c9f64a59875d034e2a2cab27603c1884 (patch) | |
tree | 56f399562e1869a8c9897f39e8e133f3b889d92f /lib/Support/Triple.cpp | |
parent | 691a4882ed086912edfe60da225bdc3f3e2f9a82 (diff) |
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r-- | lib/Support/Triple.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index ccb1a24976..af934ae3fa 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -38,6 +38,7 @@ const char *Triple::getArchTypeName(ArchType Kind) { case mblaze: return "mblaze"; case ptx32: return "ptx32"; case ptx64: return "ptx64"; + case le32: return "le32"; } return "<invalid>"; @@ -72,6 +73,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) { case ptx32: return "ptx"; case ptx64: return "ptx"; + + case le32: return "le32"; } } @@ -171,6 +174,8 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) { return ptx32; if (Name == "ptx64") return ptx64; + if (Name == "le32") + return le32; return UnknownArch; } @@ -249,6 +254,8 @@ const char *Triple::getArchNameForAssembler() { return "ptx32"; if (Str == "ptx64") return "ptx64"; + if (Str == "le32") + return "le32"; return NULL; } @@ -302,6 +309,8 @@ Triple::ArchType Triple::ParseArch(StringRef ArchName) { return ptx32; else if (ArchName == "ptx64") return ptx64; + else if (ArchName == "le32") + return le32; else return UnknownArch; } |