[cfe-commits] r99252 - in /cfe/trunk/lib/CodeGen: CGCXX.cpp CGVtable.cpp CGVtable.h CodeGenModule.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Mar 22 21:52:06 PDT 2010
On Mon, Mar 22, 2010 at 9:31 PM, Anders Carlsson <andersca at mac.com> wrote:
> Author: andersca
> Date: Mon Mar 22 23:31:31 2010
> New Revision: 99252
>
> URL: http://llvm.org/viewvc/llvm-project?rev=99252&view=rev
> Log:
> Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.
This apparently gets rid of a couple of checks: one to avoid
generating unused thunks for inline virtual functions, and one to
avoid generating thunks for the base dtor. Did these checks move
somewhere else when I wasn't looking?
> --- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGCXX.cpp Mon Mar 22 23:31:31 2010
> @@ -489,11 +489,17 @@
> }
>
> void CodeGenModule::BuildThunksForVirtual(GlobalDecl GD) {
> + const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
> +
> + if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD))
> + GD = GlobalDecl(DD, GD.getDtorType());
> + else
> + GD = MD->getCanonicalDecl();
This canonicalizes general method declarations but not destructor
declarations; is that intentional?
-Eli
More information about the cfe-commits
mailing list