[cfe-dev] AST: Splitting MangleContext?

Timur Iskhodzhanov timurrrr at google.com
Mon Sep 30 11:47:21 PDT 2013


Yes, exactly.
30 сент. 2013 г. 22:42 пользователь "Reid Kleckner" <rnk at google.com>
написал:

> Oh, presumably to keep the data members out of the header?
>
>
> On Mon, Sep 30, 2013 at 11:42 AM, Reid Kleckner <rnk at google.com> wrote:
>
>> I was thinking along the same lines, but why do you need *Impl classes?
>>
>>
>> On Mon, Sep 30, 2013 at 6:12 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:
>>
>>> Hi,
>>>
>>> AST/MangleContext is becoming increasingly ABI-aware and less "pure"
>>> over time, e.g. now it has notions of VTTs, VFTables, VBTables,
>>> ItaniumThreadLocalWrapper etc.
>>> ABI-specific implementations like ItaniumMangleContext and
>>> MicrosoftMangleContext are privately defined in their own TUs.
>>>
>>> I think it's time to split the MangleContext interface and expose the
>>> ABI-specific methods in public ItaniumMangleContext and
>>> MicrosoftMangleContext interfaces.
>>>
>>> Probably a way to go is to
>>> a) rename old {Itanium,Microsoft}MangleContext to
>>> {Itanium,Microsoft}MangleContextImpl
>>> b) define new {Itanium,Microsoft}MangleContext interfaces in
>>> AST/Mangle.h, inheriting from MangleContext
>>> c) Move the ABI-specific virtual method declarations to the respective
>>> interfaces
>>> d) Inherit {Itanium,Microsoft}MangleContextImpl from
>>> {Itanium,Microsoft}MangleContext
>>> e) Make create{Itanium,Microsoft}MangleContext static methods of
>>> {Itanium,Microsoft}MangleContext.
>>>
>>> Are there any objections or suggestions?
>>>
>>> --
>>> Timur
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130930/6651fdad/attachment.html>


More information about the cfe-dev mailing list