summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-08-09 19:54:32 +0000
committerBob Wilson <bob.wilson@apple.com>2011-08-09 19:54:32 +0000
commitf60d6df8873acc6fa3086a815f04aca753867d3a (patch)
treee373b71b4363e2481db32ddd0f6d88c6fafefc46 /llvm/lib/Support/Unix
parent4c1e92064026cb3ca690cd26f1288b3c6f3af2d5 (diff)
downloadbcm5719-llvm-f60d6df8873acc6fa3086a815f04aca753867d3a.tar.gz
bcm5719-llvm-f60d6df8873acc6fa3086a815f04aca753867d3a.zip
Put Darwin-specific code inside an __APPLE__ ifdef.
llvm-svn: 137137
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Host.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Host.inc b/llvm/lib/Support/Unix/Host.inc
index 0f3e31a41b9..744fb9e6996 100644
--- a/llvm/lib/Support/Unix/Host.inc
+++ b/llvm/lib/Support/Unix/Host.inc
@@ -29,10 +29,12 @@ using namespace llvm;
static std::string getOSVersion() {
struct utsname info;
+#ifdef __APPLE__
// Recognize UNAME_RELEASE environment variable to match Darwin uname.
const char *UnameOverride = ::getenv("UNAME_RELEASE");
if (UnameOverride && UnameOverride[0] != '\0')
return UnameOverride;
+#endif // __APPLE__
if (uname(&info))
return "";
OpenPOWER on IntegriCloud