On Wed, 7 Dec 2011, Diego Novillo wrote: > On 12/07/11 10:46, Richard Guenther wrote: > > On Wed, 7 Dec 2011, Diego Novillo wrote: > > > > > On 12/07/11 09:52, Richard Guenther wrote: > > > > > > > Index: gcc/lto-streamer-out.c > > > > =================================================================== > > > > *** gcc/lto-streamer-out.c (revision 182081) > > > > --- gcc/lto-streamer-out.c (working copy) > > > > *************** tree_is_indexable (tree t) > > > > *** 129,134 **** > > > > --- 129,144 ---- > > > > else if (TREE_CODE (t) == VAR_DECL&& decl_function_context (t) > > > > && !TREE_STATIC (t)) > > > > return false; > > > > + /* If this is a decl generated for block local externs for > > > > + debug info generation, stream it unshared alongside BLOCK_VARS. > > > > */ > > > > + else if (VAR_OR_FUNCTION_DECL_P (t) > > > > + /* ??? The following tests are a literal match on what > > > > + c-decl.c:pop_scope does. */ > > > > > > Factor it into a common routine then? > > > > pop_scope of course _sets_ the values that way, it doesn't test them. > > Yes. I meant factoring, so future users have something to call, instead of > three seemingly random flag checks. pop_scope could also be calling some > complementary setter instead of doing the seemingly random flag setting.
I don't see a good way to factor out the flags setting. Factoring out the copying maybe. But well... we can do that when a 2nd user comes along? Richard.