aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-05-17 21:05:49 +0000
committerJohn McCall <rjmccall@apple.com>2011-05-17 21:05:49 +0000
commit492bafc66bdd22128327aab11804db476688b44e (patch)
tree728f13a04cbb8eef92400ba1b49403dfaee21149
parentbe63122e65ea06010c4ce06a77276bcb29a575b6 (diff)
Revert r131434, my commit disabling the complete-object constructor
optimization for abstract classes; there was a misunderstanding, and it turns out that there are no kexts which rely on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131489 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGCXX.cpp3
-rw-r--r--test/CodeGenCXX/apple-kext-symbols.cpp20
2 files changed, 1 insertions, 22 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 09e0aa63b6..f6fc202eaa 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -176,9 +176,8 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
void CodeGenModule::EmitCXXConstructors(const CXXConstructorDecl *D) {
// The constructor used for constructing this as a complete class;
// constucts the virtual bases, then calls the base constructor.
- if (!D->getParent()->isAbstract() || getLangOptions().AppleKext) {
+ if (!D->getParent()->isAbstract()) {
// We don't need to emit the complete ctor if the class is abstract.
- // But kexts somehow manage to violate this assumption.
EmitGlobal(GlobalDecl(D, Ctor_Complete));
}
diff --git a/test/CodeGenCXX/apple-kext-symbols.cpp b/test/CodeGenCXX/apple-kext-symbols.cpp
deleted file mode 100644
index f9aeafc3ad..0000000000
--- a/test/CodeGenCXX/apple-kext-symbols.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
-
-// rdar://problem/9429976
-namespace test0 {
- struct A {
- A();
- virtual ~A();
- virtual void foo() = 0;
- };
-
- // CHECK: define void @_ZN5test01AC1Ev(
- // CHECK: define void @_ZN5test01AC2Ev(
- A::A() {}
-
- // CHECK: define void @_ZN5test01AD0Ev(
- // CHECK: define void @_ZN5test01AD1Ev(
- // CHECK: define void @_ZN5test01AD2Ev(
- A::~A() {}
-}
-