diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-13 21:36:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-13 21:36:56 +0000 |
commit | 500d9f82218a1aa94cd886aadde46a3cca48f3e4 (patch) | |
tree | 479cddc788b25de674dae98ef56aa0f3c60bbc01 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | d74a564feb4bbc3bc86ae22b3c979c9e6d787314 (diff) | |
download | bcm5719-llvm-500d9f82218a1aa94cd886aadde46a3cca48f3e4.tar.gz bcm5719-llvm-500d9f82218a1aa94cd886aadde46a3cca48f3e4.zip |
Disable the available_externally optimization for inline virtual
methods for which the key function is guaranteed to be in another
translation unit. Unfortunately, this guarantee isn't the case when
dealing with shared libraries that fail to export these virtual method
definitions.
I'm reopening PR6747 so we can consider this again at a later point in
time.
llvm-svn: 103741
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 6dd16e73b49..05c7a87e5fd 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -316,17 +316,6 @@ GetLinkageForFunction(ASTContext &Context, const FunctionDecl *FD, == TSK_ExplicitInstantiationDeclaration) return CodeGenModule::GVA_C99Inline; - // If this is a virtual method and its class has a key method in another - // translation unit, we know that this method will be present in that - // translation unit. In this translation unit we will use this method - // 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() && !MD->isImplicit() && - CodeGenVTables::isKeyFunctionInAnotherTU(Context, RD)) - return CodeGenModule::GVA_C99Inline; - } - return CodeGenModule::GVA_CXXInline; } |