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.

llvm-svn: 131489
This commit is contained in:
John McCall 2011-05-17 21:05:49 +00:00
parent c7e291b354
commit 3597b6340c
2 changed files with 1 additions and 22 deletions

View File

@ -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));
}

View File

@ -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() {}
}