blob: 29cfc07e92d8a076e1850228768091ced4701b4a [file] [log] [blame]
Nick Lewycky70d085a2011-12-13 00:32:15 +00001// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s | FileCheck %s
Douglas Gregor92be2a52011-12-10 00:23:21 +00002
3struct X {
4 X();
5 ~X();
6};
7
8struct Y {
9 X get();
10};
11
12struct X2 {
13 X x;
14};
15
16template<typename T>
17void call() {
18 Y().get();
19}
20
21// CHECK: define weak_odr void @_Z4callIiEvv
22// CHECK: call void @_ZN1Y3getEv
23// CHECK-NEXT: call void @_ZN1XD1Ev
24// CHECK-NEXT: ret void
25template void call<int>();
26
27template<typename T>
28void compound_literal() {
29 (X2){};
30}
31
32// CHECK: define weak_odr void @_Z16compound_literalIiEvv
33// CHECK: call void @_ZN1XC1Ev
34// CHECK-NEXT: call void @_ZN2X2D1Ev
35// CHECK-NEXT: ret void
36template void compound_literal<int>();
37