Files
clang-p2996/clang/test/CodeGenCXX/abstract-class-ctors-dtors.cpp
Rafael Espindola c3cde36ead Output destructors and constructors in a more natural order.
With this patch we output the in the order
C2
C1

D2
D1
D0

Which means that a destructor or constructor that call another is output after
the callee. This is a bit easier to read IHMO and a tiny bit more efficient
as we don't put a decl in DeferredDeclsToEmit.

llvm-svn: 196784
2013-12-09 14:51:17 +00:00

17 lines
401 B
C++

// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
// Check that we dont emit the complete constructor/destructor for this class.
struct A {
virtual void f() = 0;
A();
~A();
};
// CHECK-NOT-LABEL: define void @_ZN1AC1Ev
// CHECK-LABEL: define void @_ZN1AC2Ev
// CHECK-LABEL: define void @_ZN1AD2Ev
// CHECK-LABEL: define void @_ZN1AD1Ev
A::A() { }
A::~A() { }