diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-06 23:13:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-06 23:13:35 +0000 |
commit | b0769101ac05792ccc539bc7359b1927b3fd4aca (patch) | |
tree | eecf9f967ad8a69e8cebc92b83a497a49ce23f15 /lib/CodeGen/CodeGenModule.cpp | |
parent | b0e921622100486175448a7554909d7f019d21ea (diff) |
Do not give implicitly-defined virtual members functions
available_externally linkage, since they may not have been given a
strong definition in another translation unit. Without this patch, the
following test case fails to link with a GCC-compiled libstdc++:
#include <sstream>
int main() { std::basic_stringbuf<char> bs; }
Fixes the last problem with the Boost.IO library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 9c84bcec05..6cbc3f67c2 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -322,8 +322,8 @@ GetLinkageForFunction(ASTContext &Context, const FunctionDecl *FD, // only for inlining and analysis. This is the semantics of c99 inline. if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) { const CXXRecordDecl *RD = MD->getParent(); - if (MD->isVirtual() && - CodeGenVTables::isKeyFunctionInAnotherTU(Context, RD)) + if (MD->isVirtual() && !MD->isImplicit() && + CodeGenVTables::isKeyFunctionInAnotherTU(Context, RD)) return CodeGenModule::GVA_C99Inline; } |