[cfe-commits] [PATCH] Make behavior of RecordLayoutBuilder overridable

Charles Davis cdavis at mymail.mines.edu
Sun Aug 15 23:18:23 PDT 2010


OK to commit?

On 8/14/10 10:53 PM, Charles Davis wrote:
> On 8/14/10 10:39 PM, Charles Davis wrote:
>> On 8/14/10 8:03 PM, Sean Hunt wrote:
>>> On 08/14/2010 07:34 PM, Charles Davis wrote:
>>>> On 8/14/10 1:55 PM, John McCall wrote:
>>>>> This seems fine, though yeah, I guess I'd prefer that you checked it in with
>>>>> the MS layout code.
>>>> Here's a version that includes some MS-specific code. It handles the
>>>> case where a class has both a virtual method and a virtual base (in such
>>>> cases, VC would give it two virtual pointers).
>>>
>>> Does every member function need to be virtual? A lot of those seem like 
>>> overriding them is possibly a bad idea,
>> Most C++ ABIs might be compatible with C, but how do we know that
>> someone won't come up with a novel ABI that has completely different
>> conceptions about everything--including class layout?
>>> and in any case it's not very 
>>> useful to make them virtual if we aren't overriding them.
>> I concede to you on that. As much as I don't want to end up breaking
>> backwards compatibility later on, it might be worth removing most of the
>> 'virtual's from the patch to minimize the (tiny) performance impact of
>> virtual calls. The Clang C++ API is supposed to be "unstable", after all...
> And here's a patch where only the methods that are overridden in
> MSRecordLayoutBuilder are 'virtual'.
> 
> Chip
> 




More information about the cfe-commits mailing list