aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
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 /lib/Support
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 'lib/Support')
-rw-r--r--lib/Support/Triple.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index 5310c3a..e8cf69d 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -44,6 +44,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
case UnknownOS: return "unknown";
case Darwin: return "darwin";
+ case DragonFly: return "dragonfly";
case FreeBSD: return "freebsd";
case Linux: return "linux";
}
@@ -80,6 +81,8 @@ void Triple::Parse() const {
std::string OSName = getOSName();
if (memcmp(&OSName[0], "darwin", 6) == 0)
OS = Darwin;
+ else if (memcmp(&OSName[0], "dragonfly", 9) == 0)
+ OS = DragonFly;
else if (memcmp(&OSName[0], "freebsd", 7) == 0)
OS = FreeBSD;
else if (memcmp(&OSName[0], "linux", 5) == 0)