summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite3384c4f2e3e8ee6d5b6de83321a299aac86a268 (patch)
tree70a946de8aea25918972758a676492c4f1c9a89a /llvm/lib/Support
parent5bbebfe9bc46b1142a3447a72b2b07899e5bf4b6 (diff)
downloadbcm5719-llvm-e3384c4f2e3e8ee6d5b6de83321a299aac86a268.tar.gz
bcm5719-llvm-e3384c4f2e3e8ee6d5b6de83321a299aac86a268.zip
Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type. llvm-svn: 72242
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Triple.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 5310c3a6e73..e8cf69d81ff 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud