diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 02:24:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 02:24:11 +0000 |
commit | fc652dd9c3bdd5c3c672690891621d9e44e1199e (patch) | |
tree | 650f07d3366f51c9fa550ca33441ec14d8d859da /include/llvm/ADT | |
parent | f28af7f11d99e9a9111275a13fe7993e6735197b (diff) | |
download | external_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.h | 8 |
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 |