From: Anders Carlsson Date: Sun, 15 May 2011 01:50:14 +0000 (+0000) Subject: Disable the optimization until the bug noticed by Sean Hunt has been fixed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1493e2369cb426da9d916949f45e62a6e6ac5ab4;p=clang Disable the optimization until the bug noticed by Sean Hunt has been fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131372 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index 785b9e129a..73dfc9fe7d 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -745,6 +745,10 @@ void CodeGenFunction::EmitCtorPrologue(const CXXConstructorDecl *CD, /// any vtable pointers before calling this destructor. static bool CanSkipVTablePointerInitialization(ASTContext &Context, const CXXDestructorDecl *Dtor) { + // FIXME: We need to check dtors of bases of members too. + // Re-enable once this has been fixed. + return false; + if (!Dtor->hasTrivialBody()) return false; diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp index c54d3e5297..fea3582d32 100644 --- a/test/CodeGenCXX/mangle-subst-std.cpp +++ b/test/CodeGenCXX/mangle-subst-std.cpp @@ -8,8 +8,8 @@ // CHECK: @_ZTCSd0_Si = linkonce_odr unnamed_addr constant // CHECK: @_ZTCSd16_So = linkonce_odr unnamed_addr constant // CHECK: @_ZTTSo = linkonce_odr unnamed_addr constant -// CHECK: @_ZTTSi = linkonce_odr unnamed_addr constant // CHECK: @_ZTVSo = linkonce_odr unnamed_addr constant +// CHECK: @_ZTTSi = linkonce_odr unnamed_addr constant // CHECK: @_ZTVSi = linkonce_odr unnamed_addr constant namespace std { struct A { A(); }; diff --git a/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp b/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp index f992bd339d..3b70ec03a3 100644 --- a/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp +++ b/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// XFAIL: * namespace Test1 {