aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-06-02 19:20:03 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-06-02 12:20:03 -0700
commitd2d87e6d9ed5644287247ae5dff315d0a0b57de7 (patch)
treef65748802169bcd155e81a3c68834a833c25f1bc /gcc
parent89422e4749ab8f907b23fa44f32efc4cde9f5fc7 (diff)
downloadgcc-d2d87e6d9ed5644287247ae5dff315d0a0b57de7.zip
gcc-d2d87e6d9ed5644287247ae5dff315d0a0b57de7.tar.gz
gcc-d2d87e6d9ed5644287247ae5dff315d0a0b57de7.tar.bz2
cp-tree.h: Include cgraph.h
2004-06-02 Andrew Pinski <pinskia@physics.uc.edu> * cp-tree.h: Include cgraph.h (DECL_NEEDED_P): Use cgraph_*node on the decl instead of TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl. From-SVN: r82575
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-tree.h7
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c5ea71e..1615c2d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * cp-tree.h: Include cgraph.h
+ (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
+ TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
+
2004-06-01 Jason Merrill <jason@redhat.com>
PR c++/15142
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 086090c..84d3d47 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
#include "hashtab.h"
#include "splay-tree.h"
#include "varray.h"
+#include "cgraph.h"
#include "c-common.h"
#include "name-lookup.h"
@@ -1710,8 +1711,10 @@ struct lang_decl GTY(())
not something is comdat until end-of-file. */
#define DECL_NEEDED_P(DECL) \
((at_eof && TREE_PUBLIC (DECL) && !DECL_COMDAT (DECL)) \
- || (DECL_ASSEMBLER_NAME_SET_P (DECL) \
- && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL))) \
+ || (DECL_P \
+ && (TREE_CODE (DECL) == FUNCTION_DECL \
+ ? cgraph_node (DECL)->needed \
+ : cgraph_varpool_node (DECL)->needed)) \
|| (((flag_syntax_only || flag_unit_at_a_time) && TREE_USED (DECL))))
/* For a FUNCTION_DECL or a VAR_DECL, the language linkage for the