diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-05-02 20:43:24 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-05-02 16:43:24 -0400 |
commit | 64b59a80f755d6ca6b1ab909f2a267c3376803ad (patch) | |
tree | a122f23eb74b7af597fd74a1558c5fac6ab9e969 /gcc/toplev.c | |
parent | 7145d9fe6bb782d384cab328c028507b4f8f435a (diff) | |
download | gcc-64b59a80f755d6ca6b1ab909f2a267c3376803ad.zip gcc-64b59a80f755d6ca6b1ab909f2a267c3376803ad.tar.gz gcc-64b59a80f755d6ca6b1ab909f2a267c3376803ad.tar.bz2 |
toplev.c (debug_ignore_block): Return int.
* toplev.c (debug_ignore_block): Return int.
* dwarf2out.c (dwarf2out_ignore_block): Likewise.
* toplev.h, dwarf2out.h: Adjust.
* emit-rtl.c (remove_unnecessary_notes): Test return value.
* emit-rtl.c (remove_unnecessary_notes): Fix spelling of "necessary".
* toplev.c, final.c, rtl.h: Adjust.
From-SVN: r33616
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 0d45f69..1a35497 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2598,7 +2598,7 @@ rest_of_compilation (decl) /* Then remove any notes we don't need. That will make iterating over the instruction sequence faster, and allow the garbage collector to reclaim the memory used by the notes. */ - remove_unncessary_notes (); + remove_unnecessary_notes (); /* In function-at-a-time mode, we do not attempt to keep the BLOCK tree in sensible shape. So, we just recalculate it here. */ @@ -4924,16 +4924,26 @@ debug_undef (lineno, buffer) #endif /* DWARF2_DEBUGGING_INFO */ } -/* Tell the debugging backend that we've decided not to emit any - debugging information for BLOCK, so it can clean up after any local - classes or nested functions. */ +/* Returns nonzero if it is appropriate not to emit any debugging + information for BLOCK, because it doesn't contain any instructions. + This may not be the case for blocks containing nested functions, since + we may actually call such a function even though the BLOCK information + is messed up. */ -void +int debug_ignore_block (block) tree block ATTRIBUTE_UNUSED; { + /* Never delete the BLOCK for the outermost scope + of the function; we can refer to names from + that scope even if the block notes are messed up. */ + if (is_body_block (block)) + return 0; + #ifdef DWARF2_DEBUGGING_INFO if (write_symbols == DWARF2_DEBUG) - dwarf2out_ignore_block (block); + return dwarf2out_ignore_block (block); #endif + + return 1; } |