summaryrefslogtreecommitdiffstats
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 8861a20..1376e46 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -29,6 +29,12 @@
#define ATTRIBUTE_USED
#endif
+#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
#ifdef __GNUC__ // aka 'ATTRIBUTE_CONST' but following LLVM Conventions.
#define ATTRIBUTE_READNONE __attribute__((__const__))
#else
OpenPOWER on IntegriCloud