aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@apple.com>2004-06-15 20:52:00 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-06-15 13:52:00 -0700
commit1f2c9ba511080970929a98ac82e644eb11c65dd8 (patch)
tree5e31b4103474eccfa9bc7b6397977e205039d62a /gcc
parenteae29fe1dcd76ead474050e5849a6e36ae1f8b29 (diff)
downloadgcc-1f2c9ba511080970929a98ac82e644eb11c65dd8.zip
gcc-1f2c9ba511080970929a98ac82e644eb11c65dd8.tar.gz
gcc-1f2c9ba511080970929a98ac82e644eb11c65dd8.tar.bz2
re PR c++/14639 ([non-unit-at-a-time] Incorrect emission of unused compiler-generated destructor)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/cp-tree.h7
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7b61cfc..5e2c20b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index db6b750..320098b 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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