I think clang's delayed codegen approach is a design flaw, I'd be happy to see it gone.
On Wednesday, January 21, 2015, Rafael Espíndola <[email protected]> wrote: > On 20 January 2015 at 12:42, David Majnemer <[email protected] > <javascript:;>> wrote: > > I don't think this approach would handle things like: > > > > int pr22217_foo; > > int *b = &pr22217_foo; > > extern int pr22217_foo __asm__("pr22217_bar"); > > > > With your patch, pr22217_foo gets emitted. > > With gcc, pr22217_bar gets emitted. > > Gosh, this part is horrible. I can see two options: > > * Check in CodeGenModule::getMangledName than the name we get is the > same as the cache and error if not. Very expensive. Just rejecting > __asm__ after the name has been computed might have the same effect > and be cheaper. > > * Delay all of codegen. Basically just return false from > CodeGenModule::MayBeEmittedEagerly and try to avoid the order change > in codegen. The more I think about it, the more this looks desirable. > It should also fix pr16187 and allow us to finally cache visibility > computations. > > Cheers, > Rafael >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
