aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-22 02:24:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-22 02:24:11 +0000
commitfc652dd9c3bdd5c3c672690891621d9e44e1199e (patch)
tree650f07d3366f51c9fa550ca33441ec14d8d859da /include/llvm/ADT
parentf28af7f11d99e9a9111275a13fe7993e6735197b (diff)
downloadexternal_llvm-fc652dd9c3bdd5c3c672690891621d9e44e1199e.zip
external_llvm-fc652dd9c3bdd5c3c672690891621d9e44e1199e.tar.gz
external_llvm-fc652dd9c3bdd5c3c672690891621d9e44e1199e.tar.bz2
Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/Triple.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index f146c0f..b260f98 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -50,6 +50,7 @@ public:
UnknownOS,
Darwin,
+ DragonFly,
FreeBSD,
Linux
};
@@ -75,6 +76,13 @@ public:
Triple() : Data(""), Arch(InvalidArch) {}
explicit Triple(const char *Str) : Data(Str), Arch(InvalidArch) {}
+ explicit Triple(const char *ArchStr, const char *VendorStr, const char *OSStr)
+ : Data(ArchStr), Arch(InvalidArch) {
+ Data += '-';
+ Data += VendorStr;
+ Data += '-';
+ Data += OSStr;
+ }
/// @}
/// @name Typed Component Access