[llvm-commits] [llvm] r117200 - in /llvm/trunk: include/llvm/Function.h include/llvm/Support/Compiler.h lib/Target/ARM/ARMExpandPseudoInsts.cpp lib/Target/X86/X86FloatingPoint.cpp lib/Target/X86/X86JITInfo.cpp lib/Transforms/Utils/LowerSwitch.cpp unittests/ADT/SmallVectorTest.cpp
Chandler Carruth
chandlerc at gmail.com
Sat Oct 23 01:10:43 PDT 2010
Author: chandlerc
Date: Sat Oct 23 03:10:43 2010
New Revision: 117200
URL: http://llvm.org/viewvc/llvm-project?rev=117200&view=rev
Log:
Switch attribute macros to use 'LLVM_' as a prefix. We retain the old names
until other LLVM projects using these are cleaned up.
Modified:
llvm/trunk/include/llvm/Function.h
llvm/trunk/include/llvm/Support/Compiler.h
llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
llvm/trunk/lib/Target/X86/X86JITInfo.cpp
llvm/trunk/lib/Transforms/Utils/LowerSwitch.cpp
llvm/trunk/unittests/ADT/SmallVectorTest.cpp
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Sat Oct 23 03:10:43 2010
@@ -152,7 +152,7 @@
/// 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
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Sat Oct 23 03:10:43 2010
@@ -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
Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Sat Oct 23 03:10:43 2010
@@ -102,8 +102,8 @@
friend bool operator<(const NEONLdStTableEntry &TE, unsigned PseudoOpc) {
return TE.PseudoOpc < PseudoOpc;
}
- friend bool ATTRIBUTE_UNUSED operator<(unsigned PseudoOpc,
- const NEONLdStTableEntry &TE) {
+ friend bool LLVM_ATTRIBUTE_UNUSED operator<(unsigned PseudoOpc,
+ const NEONLdStTableEntry &TE) {
return PseudoOpc < TE.PseudoOpc;
}
};
Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sat Oct 23 03:10:43 2010
@@ -575,7 +575,8 @@
friend bool operator<(const TableEntry &TE, unsigned V) {
return TE.from < V;
}
- friend bool ATTRIBUTE_USED operator<(unsigned V, const TableEntry &TE) {
+ friend bool LLVM_ATTRIBUTE_USED operator<(unsigned V,
+ const TableEntry &TE) {
return V < TE.from;
}
};
Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Sat Oct 23 03:10:43 2010
@@ -337,7 +337,7 @@
// no support for inline assembly
static
#endif
-void ATTRIBUTE_USED
+void LLVM_ATTRIBUTE_USED
X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
intptr_t *RetAddrLoc = &StackPtr[1];
assert(*RetAddrLoc == RetAddr &&
Modified: llvm/trunk/lib/Transforms/Utils/LowerSwitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerSwitch.cpp?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerSwitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerSwitch.cpp Sat Oct 23 03:10:43 2010
@@ -109,7 +109,8 @@
// operator<< - Used for debugging purposes.
//
static raw_ostream& operator<<(raw_ostream &O,
- const LowerSwitch::CaseVector &C) ATTRIBUTE_USED;
+ const LowerSwitch::CaseVector &C)
+ LLVM_ATTRIBUTE_USED;
static raw_ostream& operator<<(raw_ostream &O,
const LowerSwitch::CaseVector &C) {
O << "[";
Modified: llvm/trunk/unittests/ADT/SmallVectorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallVectorTest.cpp?rev=117200&r1=117199&r2=117200&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/SmallVectorTest.cpp (original)
+++ llvm/trunk/unittests/ADT/SmallVectorTest.cpp Sat Oct 23 03:10:43 2010
@@ -77,7 +77,7 @@
return c0.getValue() == c1.getValue();
}
- friend bool ATTRIBUTE_UNUSED
+ friend bool LLVM_ATTRIBUTE_UNUSED
operator!=(const Constructable & c0, const Constructable & c1) {
return c0.getValue() != c1.getValue();
}
More information about the llvm-commits
mailing list