Don't #include OSAtomic.h unless we really need it.
authorOwen Anderson <resistor@mac.com>
Fri, 15 May 2009 05:13:57 +0000 (05:13 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 15 May 2009 05:13:57 +0000 (05:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71837 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Atomic.h

index c6d59531917e5347db3c6cb465067ae6fcdf8731..00179844e5b28107397e6b3acedf81bee38b56f1 100644 (file)
 #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