<div dir="ltr"><div>- // classes with no virtual bases, so try to emit it as an alias.</div><div>- if (dtorType == Dtor_Complete &&</div><div>- !dtor->getParent()->getNumVBases() &&</div><div>- !TryEmitDefinitionAsAlias(GlobalDecl(dtor, Dtor_Complete),</div>
<div>- GlobalDecl(dtor, Dtor_Base)))</div><div>+ // classes with no virtual bases, so try to emit it as an alias or just skip</div><div>+ // entirely if the ABI doesn't need it.</div><div>
+ if (dtorType == Dtor_Complete && dtor->getParent()->getNumVBases() == 0 &&</div><div>+ (getCXXABI().useThunkForDtorVariant(dtor, Dtor_Complete) ||</div><div>+ !TryEmitDefinitionAsAlias(GlobalDecl(dtor, Dtor_Complete),</div>
<div>+ GlobalDecl(dtor, Dtor_Base))))</div><div><br></div><div>One thing that worries me about this is, how do we guarantee that Dtor_Base gets emitted?</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 9:27 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think supporting destructor aliases for classes that have just one<br>
destructor is a wrong thing to do.<br>
<br>
Please take a look at my alternative patch?<br>
<br>
2013/10/9 Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> Hi timurrrr,<br>
><br>
> Now that -mconstructor-aliases works for linkonce functions, we should<br>
> use aliases instead. This makes our code less consistent with MSVC's<br>
> code, but that was never really a goal.<br>
><br>
> <a href="http://llvm-reviews.chandlerc.com/D1872" target="_blank">http://llvm-reviews.chandlerc.com/D1872</a><br>
><br>
> Files:<br>
> lib/CodeGen/CGCXX.cpp<br>
> test/CodeGenCXX/microsoft-abi-exceptions.cpp<br>
> test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp<br>
> test/CodeGenCXX/microsoft-abi-static-initializers.cpp<br>
> test/CodeGenCXX/microsoft-abi-structors.cpp<br>
</div></div></blockquote></div><br></div>