cp-tree.h: Include cgraph.h
authorAndrew Pinski <pinskia@physics.uc.edu>
Wed, 2 Jun 2004 19:20:03 +0000 (19:20 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 2 Jun 2004 19:20:03 +0000 (12:20 -0700)
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

gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index c5ea71e5cd6afe44c16f2a99f703ba20d1aadaa5..1615c2d3a7a9b9ec6d64c7f6bf7f7d382ebb102d 100644 (file)
@@ -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
index 086090c0d22be2f26eacdd84d809cb815cf9fc4e..84d3d4719a5b34d15fcab11504def7a07119c6f6 100644 (file)
@@ -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