[PATCH] [ms-cxxabi] Implement vbtable name mangling

Reid Kleckner rnk at google.com
Fri Apr 12 12:30:12 PDT 2013


On Fri, Apr 12, 2013 at 2:42 PM, John McCall <rjmccall at apple.com> wrote:
> On Apr 12, 2013, at 10:59 AM, Reid Kleckner <rnk at google.com> wrote:
>> On Wed, Apr 10, 2013 at 4:12 PM, John McCall <rjmccall at apple.com> wrote:
>> I can indirect B through a non-virtual base, though:
>> struct A { int a; };
>> struct B : virtual A { int b; };
>> struct C : virtual B { int c; };
>> struct BB : B { };  // Indirection =/
>> struct D : BB, C { int d; };
>> D d; // Force vbtable emission.
>>
>> That gives these manglings:
>>
>> ??_8B@@7B@
>> ??_8C@@7B0@@
>> ??_8C@@7BB@@@
>> ??_8BB@@7B@
>>
>> // D's vbtables:
>> ??_8D@@7B@          // installed inside the non-virtual B
>> ??_8D@@7BC@@@   // installed inside C
>> ??_8D@@7BB@@@   // installed inside virtual B
>
> I'm really not getting these manglings.  The "...7BC..." in particular is really
> throwing me off;  is the "B" there a literal part of the mangling rather than a
> class name?

It is annoying, but I think it means const.
  Mangler.getStream() << "7B";  // '7' for vbtable, 'B' for const.

It's consistent with the other grammar comments and mangleQualifiers().



More information about the cfe-commits mailing list