aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/Compiler.h')
-rw-r--r--include/llvm/Support/Compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index da31f98628..cce652f926 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -78,4 +78,10 @@
#define NORETURN
#endif
+#ifdef __GNUC__
+#define ERROR_IF_USED __attribute__((error("wrong usage")))
+#else
+#define ERROR_IF_USED
+#endif
+
#endif