[cfe-users] Where does clang merge two structTypes into one?

Fuqian Huang via cfe-users cfe-users at lists.llvm.org
Tue Mar 19 04:39:07 PDT 2019


I want to modified clang and add a attribute some struct fields, but
clang merge two structTypes with same element types into one.
e.g.
%struct.a = type { i16, i16, i8*}
%struct.b = type { i16, i16, i8*}
these two struct types will be merged into one.
What i want is
%struct.a = type { i16, i16, i8*}
%struct.b = type { i16, i16, i8* __my_attribute__ }
I may add one attribute to some field of the struct b, and do not want
these two structs to be merged.
So, where does clang merge same structTypes.



More information about the cfe-users mailing list