re PR c++/14639 ([non-unit-at-a-time] Incorrect emission of unused compiler-generated...
authorAndrew Pinski <apinski@apple.com>
Tue, 15 Jun 2004 20:52:00 +0000 (20:52 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 15 Jun 2004 20:52:00 +0000 (13:52 -0700)
2004-06-12  Andrew Pinski  <apinski@apple.com>

        PR c++/14639
        Revert:
        2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>

                * cp-tree.h: Fix typo.

                * 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: r83199

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

index 7b61cfc338c2cb975d8a7fa3200ee635be211689..5e2c20b8408489dbf0387f35bf9ce99cd1d6d32f 100644 (file)
@@ -1,3 +1,15 @@
+2004-06-12  Andrew Pinski  <apinski@apple.com>
+
+       PR c++/14639
+       Revert:
+       2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
+
+               * cp-tree.h: Fix typo.
+
+               * 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-12  Jason Merrill  <jason@redhat.com>
 
        PR tree-optimization/14107
index db6b750ed8e78002b1213215ce6054ff81e02260..320098b773cb34ae9b5e80559d294dc36f31f3e3 100644 (file)
@@ -28,7 +28,6 @@ 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"
@@ -1709,10 +1708,8 @@ 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_P (DECL)                                           \
-       && (TREE_CODE (DECL) == FUNCTION_DECL                   \
-          ? cgraph_node (DECL)->needed                         \
-          : cgraph_varpool_node (DECL)->needed))               \
+   || (DECL_ASSEMBLER_NAME_SET_P (DECL)                                \
+       && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL))) \
    || (((flag_syntax_only || flag_unit_at_a_time) && TREE_USED (DECL))))
 
 /* For a FUNCTION_DECL or a VAR_DECL, the language linkage for the