Support/Compiler: Add LLVM_EXTENSION for use where we want to hide pedantic diags.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 1 Nov 2011 17:46:12 +0000 (17:46 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 1 Nov 2011 17:46:12 +0000 (17:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143468 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Compiler.h

index e0921572182bde9d17c3907990db725995540852..cd2e4eb997e983078ef88a1771367b4f223fbd14 100644 (file)
 #define LLVM_ATTRIBUTE_NORETURN
 #endif
 
+// LLVM_EXTENSION - Support compilers where we have a keyword to suppress
+// pedantic diagnostics.
+#ifdef __GNUC__
+#define LLVM_EXTENSION __extension__
+#else
+#define LLVM_EXTENSION
+#endif
+
 // LLVM_ATTRIBUTE_DEPRECATED(decl, "message")
 #if __has_feature(attribute_deprecated_with_message)
 # define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \