1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases -O1 -disable-llvm-passes | FileCheck %s
16 // Complete dtor: just an alias because there are no virtual bases.
17 // CHECK: @_ZN1BD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1BD2Ev
20 // CHECK: @_ZN1CD2Ev ={{.*}} unnamed_addr alias {{.*}}, bitcast {{.*}} @_ZN1BD2Ev
21 // CHECK: @_ZN1CD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN1CD2Ev
23 // Base dtor: actually calls A's base dtor.
24 // CHECK-LABEL: define{{.*}} void @_ZN1BD2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
25 // CHECK: call void @_ZN6MemberD1Ev
26 // CHECK: call void @_ZN1AD2Ev
28 // Deleting dtor: defers to the complete dtor.
29 // CHECK-LABEL: define{{.*}} void @_ZN1BD0Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
30 // CHECK: call void @_ZN1BD1Ev
31 // CHECK: call void @_ZdlPv
41 // Complete dtor: just an alias (checked above).
43 // Deleting dtor: defers to the complete dtor.
44 // CHECK-LABEL: define{{.*}} void @_ZN1CD0Ev(%struct.C* {{[^,]*}} %this) unnamed_addr
45 // CHECK: call void @_ZN1CD1Ev
46 // CHECK: call void @_ZdlPv
48 // Base dtor: just an alias to B's base dtor.
51 // A qualified call to a base class destructor should not undergo virtual
52 // dispatch. Template instantiation used to lose the qualifier.
53 struct A
{ virtual ~A(); };
54 template<typename T
> void f(T
*p
) { p
->A::~A(); }
56 // CHECK: define {{.*}} @_ZN7PR127981fINS_1AEEEvPT_(
57 // CHECK: call void @_ZN7PR127981AD1Ev(