diff options
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 11 | ||||
-rw-r--r-- | test/CodeGenCXX/PR6747.cpp | 11 |
2 files changed, 0 insertions, 22 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 6dd16e73b4..05c7a87e5f 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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; } diff --git a/test/CodeGenCXX/PR6747.cpp b/test/CodeGenCXX/PR6747.cpp deleted file mode 100644 index 5a07ce6220..0000000000 --- a/test/CodeGenCXX/PR6747.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s - -struct foo { - virtual void bar(); -// CHECK: define available_externally void @_ZN3foo3bazEv - virtual void baz() {} -}; -void zed() { - foo b; - b.baz(); -} |