[llvm-commits] [llvm] r75489 - in /llvm/trunk: include/llvm/ADT/Triple.h lib/Support/Triple.cpp
Chris Lattner
sabre at nondot.org
Mon Jul 13 13:22:23 PDT 2009
Author: lattner
Date: Mon Jul 13 15:22:23 2009
New Revision: 75489
URL: http://llvm.org/viewvc/llvm-project?rev=75489&view=rev
Log:
Add NetBSD to the Triple class, patch by Krister Walfridsson!
Modified:
llvm/trunk/include/llvm/ADT/Triple.h
llvm/trunk/lib/Support/Triple.cpp
Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=75489&r1=75488&r2=75489&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Mon Jul 13 15:22:23 2009
@@ -54,6 +54,7 @@
DragonFly,
FreeBSD,
Linux,
+ NetBSD,
OpenBSD
};
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=75489&r1=75488&r2=75489&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Mon Jul 13 15:22:23 2009
@@ -48,6 +48,7 @@
case DragonFly: return "dragonfly";
case FreeBSD: return "freebsd";
case Linux: return "linux";
+ case NetBSD: return "netbsd";
case OpenBSD: return "openbsd";
}
@@ -91,6 +92,8 @@
OS = FreeBSD;
else if (memcmp(&OSName[0], "linux", 5) == 0)
OS = Linux;
+ else if (memcmp(&OSName[0], "netbsd", 6) == 0)
+ OS = NetBSD;
else if (memcmp(&OSName[0], "openbsd", 7) == 0)
OS = OpenBSD;
else
More information about the llvm-commits
mailing list