Add the Freescale vendor to Triple.
authorHal Finkel <hfinkel@anl.gov>
Tue, 28 Aug 2012 02:10:30 +0000 (02:10 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 28 Aug 2012 02:10:30 +0000 (02:10 +0000)
Adds the vendor 'fsl' (used by Freescale SDK) to Triple. This will allow
clang support for Freescale cross-compile configurations.

Patch by Tobias von Koch.

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

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

index 7f7061ab01b9c2321f9622ea4baf97ce219e6676..c5694617a14ca0a3bc33c731fe0bcf5b7cfd5ace 100644 (file)
@@ -74,7 +74,8 @@ public:
     PC,
     SCEI,
     BGP,
-    BGQ
+    BGQ,
+    Freescale
   };
   enum OSType {
     UnknownOS,
index cca549dad56787c0496c7d29b27a0ee9bfc180fd..b5b2de1461adad57bfefc0aa7886f8dc856c0832 100644 (file)
@@ -95,6 +95,7 @@ const char *Triple::getVendorTypeName(VendorType Kind) {
   case SCEI: return "scei";
   case BGP: return "bgp";
   case BGQ: return "bgq";
+  case Freescale: return "fsl";
   }
 
   llvm_unreachable("Invalid VendorType!");
@@ -269,6 +270,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
     .Case("scei", Triple::SCEI)
     .Case("bgp", Triple::BGP)
     .Case("bgq", Triple::BGQ)
+    .Case("fsl", Triple::Freescale)
     .Default(Triple::UnknownVendor);
 }