On Oct 14, 2010, at 5:05 PM, Douglas Gregor wrote:
>
> On Oct 14, 2010, at 5:01 PM, Dan Gohman wrote:
>
>> }
>>
>> + // For now, treat all pointers as equivalent to each other.
>> + if (Ty->isPointerType())
>> + return MetadataCache[Ty] = getTBAAInfoForNamedType("TBAA.pointer",
>> Char);
>> +
>
> Basing TBAA info on strings seems... brittle. Perhaps you want to create a
> TBAA metedata builder of some sort, which has a simple C++ interface hiding
> the various strings behind it?
The strings have no purpose other than uniquifying the MDNodes; the
backend never looks at them. Front-ends can pick whatever strings
make sense for themselves. We could introduce a C++ interface hiding
the strings within clang itself, but CodeGenTBAA.cpp is only 90 lines
long right now, so it doesn't seem urgent.
Dan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits