summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/Triple.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index dd767e260c..c4792e3efd 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -43,6 +43,31 @@ const char *Triple::getArchTypeName(ArchType Kind) {
return "<invalid>";
}
+const char *Triple::getArchTypePrefix(ArchType Kind) {
+ switch (Kind) {
+ default:
+ return 0;
+
+ case alpha: return "alpha";
+
+ case arm:
+ case thumb: return "arm";
+
+ case bfin: return "bfin";
+
+ case cellspu: return "spu";
+
+ case ppc64:
+ case ppc: return "ppc";
+
+ case sparc: return "sparc";
+
+ case x86:
+ case x86_64: return "x86";
+ case xcore: return "xcore";
+ }
+}
+
const char *Triple::getVendorTypeName(VendorType Kind) {
switch (Kind) {
case UnknownVendor: return "unknown";