remove SectionFlags::Small: it is only used on Xcore, and we'll find
[oota-llvm.git] / include / llvm / Support / Compiler.h
index e5ac201c346ee9e10f33d2036021e7aabcddc462..853324611bbe757b40356367dfa66531793fe60c 100644 (file)
 
 // The VISIBILITY_HIDDEN macro, used for marking classes with the GCC-specific
 // visibility("hidden") attribute.
-#if __GNUC__ >= 4
+#if (__GNUC__ >= 4) && !defined(__MINGW32__) && !defined(__CYGWIN__)
 #define VISIBILITY_HIDDEN __attribute__ ((visibility("hidden")))
 #else
 #define VISIBILITY_HIDDEN
 #endif
 
+#if (__GNUC__ >= 4)
+#define ATTRIBUTE_USED __attribute__((__used__))
+#else
+#define ATTRIBUTE_USED
+#endif
+
+#if (__GNUC__ >= 4)
+#define BUILTIN_EXPECT(EXPR, VALUE) __builtin_expect((EXPR), (VALUE))
+#else
+#define BUILTIN_EXPECT(EXPR, VALUE) (EXPR)
+#endif
 
 // C++ doesn't support 'extern template' of template specializations.  GCC does,
 // but requires __extension__ before it.  In the header, use this:
 #define DISABLE_INLINE
 #endif
 
+#ifdef __GNUC__
+#define NORETURN __attribute__((noreturn))
+#else
+#define NORETURN
+#endif
+
 #endif