You lose one nice property of the current model: if we emit 'f', and 'f' calls 'g', we then immediately emit 'g' as well. I think it'd be nicer to emit declarations in something like depth-first usage order. (Something like: swap DeferredDeclsToEmit with a local, then walk it emitting decls, and after each one, recursively call emitCurrentDeferredDecls if DeferredDeclsToEmit isn't empty.)
On Wed, Jan 21, 2015 at 9:43 AM, Rafael Espíndola <rafael.espind...@gmail.com> wrote: > Currently we emit DeferredDeclsToEmit in reverse order. The attached > patch changes that. > > The advantages of the change are that > > * The output order is a bit closer to the source order. The change to > test/CodeGenCXX/pod-member-memcpys.cpp is a good example. > > * If we decide to deffer more, it will not cause as large changes in > the testcases as it would without this patch. > > Note that the patch is incomplete. I have to finish updating the > tests, but I wanted to check first if other think this is a good idea > first. > > Cheers, > Rafael _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits