From cd1267d2d68f03026aed21e22f7e28efd510ec5f Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 29 Jun 2009 13:36:13 +0000 Subject: [PATCH] Add triple for OpenBSD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74422 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/Triple.h | 3 ++- lib/Support/Triple.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index b3f742e0a59..96c03579584 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -53,7 +53,8 @@ public: Darwin, DragonFly, FreeBSD, - Linux + Linux, + OpenBSD }; private: diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index dd5c3d61c27..279bd43ac5a 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -48,6 +48,7 @@ const char *Triple::getOSTypeName(OSType Kind) { case DragonFly: return "dragonfly"; case FreeBSD: return "freebsd"; case Linux: return "linux"; + case OpenBSD: return "openbsd"; } return ""; @@ -90,6 +91,8 @@ void Triple::Parse() const { OS = FreeBSD; else if (memcmp(&OSName[0], "linux", 5) == 0) OS = Linux; + else if (memcmp(&OSName[0], "openbsd", 7) == 0) + OS = OpenBSD; else OS = UnknownOS;