summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-01 17:46:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-01 17:46:12 +0000
commit8f4a17214c75e8ce3f2f88a2e3cd3300faba5fc6 (patch)
tree4aac17ac1af1b45798fb8de341e07e9f957a52d8 /include
parent0e6c1c536bc39f26a01fb1e207f65a351b2b4269 (diff)
downloadllvm-8f4a17214c75e8ce3f2f88a2e3cd3300faba5fc6.tar.gz
llvm-8f4a17214c75e8ce3f2f88a2e3cd3300faba5fc6.tar.bz2
llvm-8f4a17214c75e8ce3f2f88a2e3cd3300faba5fc6.tar.xz
Support/Compiler: Add LLVM_EXTENSION for use where we want to hide pedantic diags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Compiler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index e092157218..cd2e4eb997 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -111,6 +111,14 @@
#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) \