[LLVMdev] Questions about the equality between two llvm types

Xiaolong Tang xiaolong.snake at gmail.com
Fri Jun 22 08:19:41 PDT 2012


Hi All, 

I have a question about the comparison of two types. 

Generally, comparing two types are just comparing their
pointers. However, one declared type (in programs) may be mapped into
more than one llvm types, in the module resulting from linking other
unit modules.

For example, a class "mrViewingHitRecord" may have two corresponding
IR entities:

  %class.mrViewingHitRecord.1296*
  %class.mrViewingHitRecord.1097*

So, how to justify that the above two types are the same? Does each
llvm type have one canonical type?

Xiaolong



More information about the llvm-dev mailing list