On Mon, Mar 22, 2010 at 9:31 PM, Anders Carlsson <[email protected]> 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

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to