2010-02-19 09:32:20 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s
|
2009-12-05 03:33:17 +08:00
|
|
|
|
|
|
|
struct A {
|
|
|
|
virtual ~A();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B : A {
|
|
|
|
virtual ~B();
|
|
|
|
};
|
|
|
|
|
2010-02-19 09:32:20 +08:00
|
|
|
// Complete dtor: just an alias because there are no virtual bases.
|
|
|
|
// CHECK: @_ZN1BD1Ev = alias {{.*}} @_ZN1BD2Ev
|
2010-01-02 09:01:18 +08:00
|
|
|
|
2010-02-19 03:59:28 +08:00
|
|
|
// Deleting dtor: defers to the complete dtor.
|
2009-12-05 03:33:17 +08:00
|
|
|
// CHECK: define void @_ZN1BD0Ev
|
2010-02-19 03:59:28 +08:00
|
|
|
// CHECK: call void @_ZN1BD1Ev
|
|
|
|
// CHECK: call void @_ZdlPv
|
2009-12-05 03:33:17 +08:00
|
|
|
|
2010-02-19 03:59:28 +08:00
|
|
|
// Base dtor: actually calls A's base dtor.
|
2009-12-05 03:33:17 +08:00
|
|
|
// CHECK: define void @_ZN1BD2Ev
|
|
|
|
// CHECK: call void @_ZN1AD2Ev
|
|
|
|
|
|
|
|
B::~B() { }
|