Produce direct calls instead of alias to linkonce_odr functions

Reid Kleckner rnk at google.com
Tue Nov 5 20:05:16 PST 2013


Yeah, I also tried it, but hit the same problem.  It means we're still
emitting complete dtors for classes which have no virtual bases, and we
shouldn't need them, so I'd hold off on this.  Maybe we just need to pass
-mconstructor-aliases or something.

You can see the codes in the dtor mangling in MicrosoftMangle.  ?_D is the
code for complete (aka vbase) dtor.

  switch (T) {
  // <operator-name> ::= ?1  # destructor
  case Dtor_Base: Out << "?1"; return;
  // <operator-name> ::= ?_D # vbase destructor
  case Dtor_Complete: Out << "?_D"; return;
  // <operator-name> ::= ?_G # scalar deleting destructor
  case Dtor_Deleting: Out << "?_G"; return;
  // <operator-name> ::= ?_E # vector deleting destructor
  // FIXME: Add a vector deleting dtor type.  It goes in the vtable, so we
need
  // it.
  }



On Tue, Nov 5, 2013 at 5:15 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 5 November 2013 13:23, Reid Kleckner <rnk at google.com> wrote:
> > Looks good, I'm fairly confident this will DTRT.
> >
> > As a followup someone should remove the hack at the top of
> > GetAddrOfCXXDestructor.
>
> Like the attached patch? Unfortunately this does cause some test
> failures. I have attached the before and after of
> microsoft-abi-structors.cpp, but I don't known microsoft's mangling,
> so I am not sure if it is a valid change or not.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131105/7bc7d643/attachment.html>


More information about the cfe-commits mailing list