diff --git a/llvm/include/llvm/ADT/Triple.h b/llvm/include/llvm/ADT/Triple.h index b3f742e0a59b..96c035795849 100644 --- a/llvm/include/llvm/ADT/Triple.h +++ b/llvm/include/llvm/ADT/Triple.h @@ -53,7 +53,8 @@ public: Darwin, DragonFly, FreeBSD, - Linux + Linux, + OpenBSD }; private: diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index dd5c3d61c27b..279bd43ac5a8 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/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;