summaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-05-15 05:13:57 +0000
committerOwen Anderson <resistor@mac.com>2009-05-15 05:13:57 +0000
commit8060424c40bcb7eeba21d5e365a880ae5e684dfd (patch)
tree1d3bca32fa3cbb1b8e116ffe56bcf1155df774b4 /include/llvm/System
parentc98a77d078ab5ec443576facb1402025c093f64a (diff)
downloadexternal_llvm-8060424c40bcb7eeba21d5e365a880ae5e684dfd.zip
external_llvm-8060424c40bcb7eeba21d5e365a880ae5e684dfd.tar.gz
external_llvm-8060424c40bcb7eeba21d5e365a880ae5e684dfd.tar.bz2
Don't #include OSAtomic.h unless we really need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Atomic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/System/Atomic.h b/include/llvm/System/Atomic.h
index c6d5953..0017984 100644
--- a/include/llvm/System/Atomic.h
+++ b/include/llvm/System/Atomic.h
@@ -17,8 +17,10 @@
#include "llvm/Config/config.h"
#include <stdint.h>
-#ifdef __APPLE__
+#if defined(__APPLE__)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
#include <libkern/OSAtomic.h>
+#endif
#elif LLVM_ON_WIN32
#include <windows.h>
#endif