[cfe-commits] [PATCH] Refactoring of vtable and VTT builders

Eli Friedman eli.friedman at gmail.com
Mon Jun 13 13:16:42 PDT 2011


On Mon, Jun 13, 2011 at 12:41 PM, Peter Collingbourne
<pcollingbourne at pathscale.com> wrote:
> Hi,
>
> This patch refactors the vtable and VTT builders to provide a
> backend-neutral interface to the builders in the AST library, which
> CodeGen uses to build vtables and VTTs in LLVM.  No functionality
> change intended.
>
> The main goal of this patch is to allow developers of backends
> targeting non-LLVM intermediate representations to reuse the vtable
> and VTT builders (full disclosure: PathScale is working on a WHIRL
> backend for clang).
>
> >From the point of view of the clang project itself, this patch enables
> easier unit testing of the vtable and VTT builders (the unit tests
> themselves are left for future work).
>
> (I have doubts over whether AST is the right library for this code.
> Perhaps a new library, say "Backend", should be created?)

Maybe... but shuffling around code is easy if we decide to add such a thing.

> OK to commit?

Conceptually, I don't see any issue with refactoring ABI stuff out of IRGen.

That said, it's practically impossible to review a patch of this size.
 Can you regenerate the patch in a way such that it isn't quite so
largel?  (If you can't convince your version control to do it, perhaps
actually add VTableBuilder, then move it out of CodeGen as two steps?)

-Eli




More information about the cfe-commits mailing list