[libcxxabi] r184301 - Demangle objc mangling implemented in r184250
Howard Hinnant
hhinnant at apple.com
Wed Jun 19 12:10:59 PDT 2013
On Jun 19, 2013, at 3:05 PM, John McCall <rjmccall at apple.com> wrote:
> On Jun 19, 2013, at 6:43 AM, Howard Hinnant <hhinnant at apple.com> wrote:
>> Author: hhinnant
>> Date: Wed Jun 19 08:43:18 2013
>> New Revision: 184301
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=184301&view=rev
>> Log:
>> Demangle objc mangling implemented in r184250
>>
>> Modified:
>> libcxxabi/trunk/src/cxa_demangle.cpp
>> libcxxabi/trunk/test/test_demangle.cpp
>>
>> Modified: libcxxabi/trunk/src/cxa_demangle.cpp
>> URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=184301&r1=184300&r2=184301&view=diff
>> ==============================================================================
>> --- libcxxabi/trunk/src/cxa_demangle.cpp (original)
>> +++ libcxxabi/trunk/src/cxa_demangle.cpp Wed Jun 19 08:43:18 2013
>> @@ -1759,8 +1759,12 @@ parse_vector_type(const char* first, con
>> // ::= G <type> # imaginary (C 2000)
>> // ::= Dp <type> # pack expansion (C++0x)
>> // ::= U <source-name> <type> # vendor extended type qualifier
>> +// extension := U <objc-name> <objc-type> # objc-type<identifier>
>> // extension := <vector-type> # <vector-type> starts with Dv
>>
>> +// <objc-name> ::= <k0 number> objcproto <k1 number> <identifier> # k0 = 9 + <number of digits in k1> + k1
>> +// <objc-type> := <source-name> # PU<11+>objcproto 11objc_object<source-name> 11objc_object -> id<source-name>
>
> To be clear, this is structured the way it is so that the <objc-name> is a valid <source-name>.
Understood, thanks. The code actually parses it twice, once as the source-name in a U field, and then if that source-name starts with objcproto, then again to get the objc-name.
Howard
More information about the cfe-commits
mailing list