This patch extends Clang's TBAA generation code to emit distinct tags
for incompatible pointer types.
Pointers with different element types are incompatible if the pointee
types are also incompatible (modulo sugar/modifiers).
Express this in TBAA by generating different tags for pointers based
on the pointer depth and pointee type. To get the TBAA tag for the
pointee type it uses getTypeInfoHelper on the pointee type.
I'd appreciate a careful review, because this is probably quite easy to
get subtly wrong.
Seeing this code reminds me that in a few other contexts, it would be useful to have access to the TBAA wrapper helpers in llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp, so it would be worthwhile at some point to start fronting those types into header files to simplify some of the queries, especially in cases where you want to support both old and new TBAA formats. I'd imagine your tbaa-checker tool would also want access to this information as well, for example; I know the helper I started writing wanted it.