[LLVMdev] [Debug Info + LTO] Type Uniquing for C types?
Eric Christopher
echristo at gmail.com
Fri Oct 11 11:54:27 PDT 2013
>
> I think the easiest design you'll get for uniquing C types that are
> named the same thing (i.e. type defined in a .h file) is to use the
> name of the struct combined with the file (and possibly line/column)
> as an identifier. If you want to unify by structure then you'll need
> to do something the equivalent to the type hashing that we're
> implementing in the back end, but that'll be more difficult to
> construct via the front end - it may be possible though.
>
To sum up in a slightly better way I think Doug has posted some rules
on how to merge C types for modules and we could use those to
construct a unique identifier for the type. If we do that I'd request
we prepend the type name in there some how as that'd be convenient. :)
-eric
More information about the llvm-dev
mailing list