BumpPtrAllocator: do the size check without moving any pointers
[oota-llvm.git] / include / llvm / Support / Compiler.h
index 25bf32ade5f886ff6fe2ea0022ce73b1b81cd644..85f0cc6a39176f79107a472561aee55289ff048d 100644 (file)
 #define LLVM_ATTRIBUTE_NORETURN
 #endif
 
+#if __has_attribute(returns_nonnull) || __GNUC_PREREQ(4, 9)
+#define LLVM_ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull))
+#else
+#define LLVM_ATTRIBUTE_RETURNS_NONNULL
+#endif
+
 /// LLVM_EXTENSION - Support compilers where we have a keyword to suppress
 /// pedantic diagnostics.
 #ifdef __GNUC__