summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-10-23 08:10:43 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-10-23 08:10:43 +0000
commit100c267249d1d03c4f96eede9877a4f9f54f2247 (patch)
tree1a51c4153e6acb6692b0ed191ab70ee5b8b92c19 /include
parent2b3ef8b065ff655c52efe273e9b150db302e8a5a (diff)
downloadllvm-100c267249d1d03c4f96eede9877a4f9f54f2247.tar.gz
llvm-100c267249d1d03c4f96eede9877a4f9f54f2247.tar.bz2
llvm-100c267249d1d03c4f96eede9877a4f9f54f2247.tar.xz
Switch attribute macros to use 'LLVM_' as a prefix. We retain the old names
until other LLVM projects using these are cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Function.h2
-rw-r--r--include/llvm/Support/Compiler.h24
2 files changed, 17 insertions, 9 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 2b19fa5a7f..9a0825ab4a 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -152,7 +152,7 @@ public:
/// The particular intrinsic functions which correspond to this value are
/// defined in llvm/Intrinsics.h.
///
- unsigned getIntrinsicID() const ATTRIBUTE_READONLY;
+ unsigned getIntrinsicID() const LLVM_ATTRIBUTE_READONLY;
bool isIntrinsic() const { return getIntrinsicID() != 0; }
/// getCallingConv()/setCallingConv(CC) - These method get and set the
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 014e801282..83facc3954 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -26,9 +26,9 @@
#endif
#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-#define ATTRIBUTE_USED __attribute__((__used__))
+#define LLVM_ATTRIBUTE_USED __attribute__((__used__))
#else
-#define ATTRIBUTE_USED
+#define LLVM_ATTRIBUTE_USED
#endif
// Some compilers warn about unused functions. When a function is sometimes
@@ -40,21 +40,21 @@
// (void)unused_var_name;
// Prefer cast-to-void wherever it is sufficient.
#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#define LLVM_ATTRIBUTE_UNUSED __attribute__((__unused__))
#else
-#define ATTRIBUTE_UNUSED
+#define LLVM_ATTRIBUTE_UNUSED
#endif
#ifdef __GNUC__ // aka 'ATTRIBUTE_CONST' but following LLVM Conventions.
-#define ATTRIBUTE_READNONE __attribute__((__const__))
+#define LLVM_ATTRIBUTE_READNONE __attribute__((__const__))
#else
-#define ATTRIBUTE_READNONE
+#define LLVM_ATTRIBUTE_READNONE
#endif
#ifdef __GNUC__ // aka 'ATTRIBUTE_PURE' but following LLVM Conventions.
-#define ATTRIBUTE_READONLY __attribute__((__pure__))
+#define LLVM_ATTRIBUTE_READONLY __attribute__((__pure__))
#else
-#define ATTRIBUTE_READONLY
+#define LLVM_ATTRIBUTE_READONLY
#endif
#if (__GNUC__ >= 4)
@@ -107,4 +107,12 @@
#define NORETURN
#endif
+// We provide definitions without the LLVM_ prefix briefly while transitioning
+// to always-prefixed names. These will go away as soon as the migration is
+// complete.
+#define ATTRIBUTE_USED LLVM_ATTRIBUTE_USED
+#define ATTRIBUTE_UNUSED LLVM_ATTRIBUTE_UNUSED
+#define ATTRIBUTE_READNONE LLVM_ATTRIBUTE_READNONE
+#define ATTRIBUTE_READONLY LLVM_ATTRIBUTE_READONLY
+
#endif