aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Compiler.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-10-23 08:40:19 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-10-23 08:40:19 +0000
commit19e57025d458d3cb50804fd821fd89b868a819bd (patch)
tree6aadc3d38b65acf02a71f28f0688834363c22ee5 /include/llvm/Support/Compiler.h
parent5117709a1d71fc34225decde0c7fe6a3ae29c063 (diff)
Move the remaining attribute macros to systematic names based on the attribute
name and prefixed with 'LLVM_'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Compiler.h')
-rw-r--r--include/llvm/Support/Compiler.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 83facc3954..6682c84a7a 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -76,35 +76,35 @@
#define TEMPLATE_INSTANTIATION(X)
#endif
-// DISABLE_INLINE - On compilers where we have a directive to do so, mark a
-// method "not for inlining".
+// LLVM_ATTRIBUTE_NOINLINE - On compilers where we have a directive to do so,
+// mark a method "not for inlining".
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#define DISABLE_INLINE __attribute__((noinline))
+#define LLVM_ATTRIBUTE_NOINLINE __attribute__((noinline))
#elif defined(_MSC_VER)
-#define DISABLE_INLINE __declspec(noinline)
+#define LLVM_ATTRIBUTE_NOINLINE __declspec(noinline)
#else
-#define DISABLE_INLINE
+#define LLVM_ATTRIBUTE_NOINLINE
#endif
-// ALWAYS_INLINE - On compilers where we have a directive to do so, mark a
-// method "always inline" because it is performance sensitive.
-// GCC 3.4 supported this but is buggy in various cases and produces
-// unimplemented errors, just use it in GCC 4.0 and later.
+// LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do
+// so, mark a method "always inline" because it is performance sensitive. GCC
+// 3.4 supported this but is buggy in various cases and produces unimplemented
+// errors, just use it in GCC 4.0 and later.
#if __GNUC__ > 3
-#define ALWAYS_INLINE __attribute__((always_inline))
+#define LLVM_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline))
#elif defined(_MSC_VER)
-#define ALWAYS_INLINE __forceinline
+#define LLVM_ATTRIBUTE_ALWAYS_INLINE __forceinline
#else
-#define ALWAYS_INLINE
+#define LLVM_ATTRIBUTE_ALWAYS_INLINE
#endif
#ifdef __GNUC__
-#define NORETURN __attribute__((noreturn))
+#define LLVM_ATTRIBUTE_NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
-#define NORETURN __declspec(noreturn)
+#define LLVM_ATTRIBUTE_NORETURN __declspec(noreturn)
#else
-#define NORETURN
+#define LLVM_ATTRIBUTE_NORETURN
#endif
// We provide definitions without the LLVM_ prefix briefly while transitioning
@@ -114,5 +114,8 @@
#define ATTRIBUTE_UNUSED LLVM_ATTRIBUTE_UNUSED
#define ATTRIBUTE_READNONE LLVM_ATTRIBUTE_READNONE
#define ATTRIBUTE_READONLY LLVM_ATTRIBUTE_READONLY
+#define NORETURN LLVM_ATTRIBUTE_NORETURN
+#define DISABLE_INLINE LLVM_ATTRIBUTE_NOINLINE
+#define ALWAYS_INLINE LLVM_ATTRIBUTE_ALWAYS_INLINE
#endif