dwblaikie wrote:

> > So maybe the solution is as simple as removing the "unique" from 
> > DISubprogram definitions, and the existing infrastructure will handle it? 
> > (maybe have to expand it to allow it to work for things with 
> > DISPFlagDefinition... )
> 
> If I understand the idea behind #119001 right, the problem that caused the 
> crashes after #75385 was the case of two distinct DISubporgrams having a 
> local type that gets uniqued during LTO, and these parent subprograms both 
> retain the reference to the same local type (It was described here [#75385 
> (comment)](https://github.com/llvm/llvm-project/pull/75385#issuecomment-2386684121)).

Yep, I think that's the original thing.

>  So I was thinking in the opposite direction: should we force unique distinct 
> definition DISubporgrams containing ODR-uniqued types, as well as it's done 
> for declaration subprograms contained by ODR-uniqued types?

I'm suggesting more broadly: we should force-unique all DISubprograms (even if 
they don't contain odr-uniqued types), by making them not distinct anymore & 
generalizing the unquing infrastructure you quoted in langref.

This should address a broader class of problems - including, for instance, LTO 
where a subprogram is inlined/out of line in multiple files.

https://github.com/llvm/llvm-project/pull/142166
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to