Add triple parsing support for TCE.
authorEli Friedman <eli.friedman@gmail.com>
Wed, 19 Aug 2009 20:46:03 +0000 (20:46 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 19 Aug 2009 20:46:03 +0000 (20:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79461 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/Support/Triple.cpp

index c63d91be99b0d569e8defedd4962db567847633b..106084d0745f3ae55e3c52456374499203f4747d 100644 (file)
@@ -62,6 +62,7 @@ public:
     ppc64,   // PPC64: powerpc64
     sparc,   // Sparc: sparc
     systemz, // SystemZ: s390x
+    tce,     // TCE (http://tce.cs.tut.fi/): tce
     thumb,   // Thumb: thumb, thumbv.*
     x86,     // X86: i[3-9]86
     x86_64,  // X86-64: amd64, x86_64
index df28b98b6896bebbe226fe52e84108c55b652982..dd767e260cbc4d7048061bc7a86a7814c8d5c1db 100644 (file)
@@ -33,6 +33,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
   case ppc:     return "powerpc";
   case sparc:   return "sparc";
   case systemz: return "s390x";
+  case tce:     return "tce";
   case thumb:   return "thumb";
   case x86:     return "i386";
   case x86_64:  return "x86_64";
@@ -99,6 +100,8 @@ Triple::ArchType Triple::getArchTypeForLLVMName(const StringRef &Name) {
     return sparc;
   if (Name == "systemz")
     return systemz;
+  if (Name == "tce")
+    return tce;
   if (Name == "thumb")
     return thumb;
   if (Name == "x86")
@@ -156,6 +159,8 @@ void Triple::Parse() const {
     Arch = sparc;
   else if (ArchName == "s390x")
     Arch = systemz;
+  else if (ArchName == "tce")
+    Arch = tce;
   else
     Arch = UnknownArch;