[LLVMdev] LTO type uniquing: ODR assertion failure

Manman Ren
Mon, 21 Jul 2014 17:39:05 -0000

On Mon, Jul 14, 2014 at 11:32 AM, Manman Ren <manman.ren at gmail.com>
wrote:

>
> We still have access to types via MDNodes directly and the assertion that
> assumes all accesses to DITypes are accessing the resolved DIType will fire
>
> i.e assert(Ty == resolve(Ty.getRef()))
>
> One example is the access to DIType via DIArray in SubroutineType. If all
> elements in the type array are DITypes we can create a DITypeArray and use
> that for SubroutineType's type array instead. But we currently have
> unspecified parameter in the type array and it is not a DIType.
>

I am going to work on a patch that adds DITypeArray (each element will be
DITypeRef, SubroutineType's type array will be DITypeArray) and adds
DITrivialType that extends from DIType (unspecified parameter will be
DITrivialType).
If you  have opinions against it, please let me know,

Thanks,
Manman


> What are your thoughts? Suggestions are welcome.
>
> Is it a good idea to canonicalize file names (i.e dA/B.h should be
> equivalent to dA/../dA/B.h)? This will reduce the chance of having two
> DITypes that should be equivalent with equivalent file names.
>
> Thanks,
> Manman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140721/c665c3c4/attachment.html>