Add Imagination Technologies to the vendors in llvm::Triple
authorDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 9 Jul 2014 16:03:10 +0000 (16:03 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 9 Jul 2014 16:03:10 +0000 (16:03 +0000)
Summary: This is a pre-requisite for supporting the mips-img-linux-gnu triple in clang.

Differential Revision: http://reviews.llvm.org/D4435

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212626 91177308-0d34-0410-b5e6-96231b3b80d8

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

index a10bc73..a2e8411 100644 (file)
@@ -88,6 +88,7 @@ public:
     BGQ,
     Freescale,
     IBM,
+    ImaginationTechnologies,
     NVIDIA
   };
   enum OSType {
index 8f3cf71..445502d 100644 (file)
@@ -115,6 +115,7 @@ const char *Triple::getVendorTypeName(VendorType Kind) {
   case BGQ: return "bgq";
   case Freescale: return "fsl";
   case IBM: return "ibm";
+  case ImaginationTechnologies: return "img";
   case NVIDIA: return "nvidia";
   }
 
@@ -292,6 +293,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
     .Case("bgq", Triple::BGQ)
     .Case("fsl", Triple::Freescale)
     .Case("ibm", Triple::IBM)
+    .Case("img", Triple::ImaginationTechnologies)
     .Case("nvidia", Triple::NVIDIA)
     .Default(Triple::UnknownVendor);
 }