]> granicus.if.org Git - clang/commitdiff
Revert r131434, my commit disabling the complete-object constructor
authorJohn McCall <rjmccall@apple.com>
Tue, 17 May 2011 21:05:49 +0000 (21:05 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 17 May 2011 21:05:49 +0000 (21:05 +0000)
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

lib/CodeGen/CGCXX.cpp
test/CodeGenCXX/apple-kext-symbols.cpp [deleted file]

index 09e0aa63b6d0531aa9e861c031926751f26940bd..f6fc202eaae230baa9984c728775ef9cd300e4ce 100644 (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));
   }
 
diff --git a/test/CodeGenCXX/apple-kext-symbols.cpp b/test/CodeGenCXX/apple-kext-symbols.cpp
deleted file mode 100644 (file)
index f9aeafc..0000000
+++ /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() {}
-}
-