[cfe-commits] r116544 - /cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp

Douglas Gregor dgregor at apple.com
Thu Oct 14 17:58:20 PDT 2010


On Oct 14, 2010, at 5:57 PM, Dan Gohman wrote:

> 
> 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.


Ah, okay. I thought the names were part of the interface with the back end.

	- Doug



More information about the cfe-commits mailing list