[cfe-commits] r75740 - in /cfe/trunk: include/clang/Index/Entity.h lib/Index/Entity.cpp

Chris Lattner clattner at apple.com
Thu Jul 16 23:09:01 PDT 2009

On Jul 16, 2009, at 11:04 AM, Argyrios Kyrtzidis wrote:

>> Hi Zhongxing,
>> I don't think this is a good idea.  Entity will be getting more
>> complicated eventually to support things like objc selectors, C++
>> templates, etc.  Eventually we want the ability to turn an Entity  
>> into
>> a stable string representation (suitable for sticking in a database
>> etc) but I don't think this should be called "getName()", it should  
>> be
>> something like "getStableString()" or something like that.
>> Argiris, what do you think?
> We can name the methods that use/return a "string encoding" as  
> method "getEncoding" and static method "getFromEncoding".
> Apart from those, it seems useful to also a have a method that will  
> return an easier to understand string for debugging purposes;
> if we compare to the linker symbols, encoding will be the mangled  
> name and a "getName" method will return the unmangled one.
> Maybe "getName" should be renamed to "getPrintableName" to make its  
> purpose more obvious ?
> Also, getPrintableName should return a std::string, not a const char  
> *.

Makes sense to me, Zhongxing can you tackle this?


More information about the cfe-commits mailing list