diff options
Diffstat (limited to 'contrib/llvm/lib/Support/Unix/Host.inc')
-rw-r--r-- | contrib/llvm/lib/Support/Unix/Host.inc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/contrib/llvm/lib/Support/Unix/Host.inc b/contrib/llvm/lib/Support/Unix/Host.inc index 7941166..519f2a1 100644 --- a/contrib/llvm/lib/Support/Unix/Host.inc +++ b/contrib/llvm/lib/Support/Unix/Host.inc @@ -1,4 +1,4 @@ - //===- llvm/Support/Unix/Host.inc -------------------------------*- C++ -*-===// +//===- llvm/Support/Unix/Host.inc -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -16,21 +16,15 @@ //=== is guaranteed to work on *all* UNIX variants. //===----------------------------------------------------------------------===// -#include "llvm/Config/config.h" -#include "llvm/ADT/StringRef.h" #include "Unix.h" -#include <sys/utsname.h> +#include "llvm/ADT/StringRef.h" +#include "llvm/Config/config.h" #include <cctype> #include <string> -#include <cstdlib> // ::getenv +#include <sys/utsname.h> using namespace llvm; -#ifdef __FreeBSD__ -std::string sys::getDefaultTargetTriple() { - return LLVM_DEFAULT_TARGET_TRIPLE; -} -#else // __FreeBSD__ static std::string getOSVersion() { struct utsname info; @@ -44,7 +38,8 @@ std::string sys::getDefaultTargetTriple() { StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE); std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-'); - // Normalize the arch, since the target triple may not actually match the target. + // Normalize the arch, since the target triple may not actually match the + // target. std::string Arch = ArchSplit.first; std::string Triple(Arch); @@ -66,4 +61,3 @@ std::string sys::getDefaultTargetTriple() { return Triple::normalize(Triple); } -#endif // __FreeBSD__ |