]> granicus.if.org Git - clang/commit
[MS] Don't bail on replacing dllimport vbase dtors with base dtors
authorReid Kleckner <rnk@google.com>
Fri, 13 Oct 2017 00:53:02 +0000 (00:53 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 13 Oct 2017 00:53:02 +0000 (00:53 +0000)
commitd5704343ee60c288c87d5b6d08b0aeecf74041da
treef6f59138edfcd0cfb83eb47ba8ee43743735fdfc
parent7cd19b9e4f1ebe5da782cde760dae82113a77e22
[MS] Don't bail on replacing dllimport vbase dtors with base dtors

Fix PR32990 by effectively reverting r283063 and solving it a different
way.

We want to limit the hack to not replace equivalent available_externally
dtors specifically to libc++, which uses always_inline. It seems certain
versions of libc++ do not provide all the symbols that an explicit
template instantiation is expected to provide.

If we get to the code that forms a real alias, only *then* check if this
is available_externally, and do that by asking a better question, which
is "is this a declaration for the linker?", because *that's* what means
we can't form an alias to it.

As a follow-on simplification, remove the InEveryTU parameter. Its last
use guarded this code for forming aliases, but we should never form
aliases to declarations, regardless of what we know about every TU.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315656 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCXX.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/dllimport-dtor-thunks.cpp [new file with mode: 0644]