[llvm-commits] [llvm] r82177 - /llvm/trunk/include/llvm/Support/Compiler.h
Julien Lerouge
jlerouge at apple.com
Thu Sep 17 16:27:11 PDT 2009
Author: jlerouge
Date: Thu Sep 17 18:27:10 2009
New Revision: 82177
URL: http://llvm.org/viewvc/llvm-project?rev=82177&view=rev
Log:
Use __attribute__((__used__)) if GCC >= 3.1 (seems to be the oldest GCC
supporting this attribute).
Modified:
llvm/trunk/include/llvm/Support/Compiler.h
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=82177&r1=82176&r2=82177&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Thu Sep 17 18:27:10 2009
@@ -23,7 +23,7 @@
#define VISIBILITY_HIDDEN
#endif
-#if (__GNUC__ >= 4)
+#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#define ATTRIBUTE_USED __attribute__((__used__))
#else
#define ATTRIBUTE_USED
More information about the llvm-commits
mailing list