[PATCH] Thread the info about vbptr sharing through ASTRecordLayout

Timur Iskhodzhanov timurrrr at google.com
Fri Nov 8 05:06:59 PST 2013


2013/11/8 Timur Iskhodzhanov <timurrrr at google.com>:
> 2013/11/7 Reid Kleckner <rnk at google.com>:
>> Comment at: include/clang/AST/RecordLayout.h:263
>> @@ -258,3 +262,3 @@
>>      assert(CXXInfo && "Record layout does not have C++ specific info!");
>>      return CXXInfo->HasOwnVBPtr;
>>    }
>> ----------------
>> This can be hasVBPtr() && !BaseSharingVBPtr.
>>
>> ================
>> Comment at: include/clang/AST/RecordLayout.h:102-105
>> @@ -101,6 +101,6 @@
>>
>>      /// HasOwnVBPtr - Does this class provide a virtual function table
>>      /// (vtable in Itanium, VBtbl in Microsoft) that is independent from
>>      /// its base classes?
>>      bool HasOwnVBPtr : 1;
>>
>> ----------------
>> This can become dead.  The comment is wrong anyway.
>>
>>
>> http://llvm-reviews.chandlerc.com/D2120
>
> Interesting - I've tried the same apporach for hasOwnVFPtr vs
> hasVFPtr, prepared a patch, passed all the tests ... and realized this
> approach is not applicable to vfptrs.
> Seems like we don't have enough layout coverage? Looking...

My fishiness detector wasn't wrong :)
Filed http://llvm.org/PR17845



More information about the cfe-commits mailing list