[cfe-commits] r131489 - in /cfe/trunk: lib/CodeGen/CGCXX.cpp test/CodeGenCXX/apple-kext-symbols.cpp

John McCall rjmccall at apple.com
Tue May 17 14:05:49 PDT 2011


Author: rjmccall
Date: Tue May 17 16:05:49 2011
New Revision: 131489

URL: http://llvm.org/viewvc/llvm-project?rev=131489&view=rev
Log:
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.


Removed:
    cfe/trunk/test/CodeGenCXX/apple-kext-symbols.cpp
Modified:
    cfe/trunk/lib/CodeGen/CGCXX.cpp

Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=131489&r1=131488&r2=131489&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Tue May 17 16:05:49 2011
@@ -176,9 +176,8 @@
 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));
   }
 

Removed: cfe/trunk/test/CodeGenCXX/apple-kext-symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-symbols.cpp?rev=131488&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-symbols.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-symbols.cpp (removed)
@@ -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() {}
-}
-





More information about the cfe-commits mailing list