Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / instantiate-temporaries.cpp
blobc08ea781b8cbd654bd8400a46ebba6e188fc87e7
1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s | FileCheck %s
3 struct X {
4 X();
5 ~X();
6 };
8 struct Y {
9 X get();
12 struct X2 {
13 X x;
16 template<typename T>
17 void call() {
18 Y().get();
21 // CHECK-LABEL: define weak_odr void @_Z4callIiEvv
22 // CHECK: call void @_ZN1Y3getEv
23 // CHECK-NEXT: call void @_ZN1XD1Ev
24 // CHECK-NEXT: ret void
25 template void call<int>();
27 template<typename T>
28 void compound_literal() {
29 (X2){};
32 // CHECK-LABEL: define weak_odr void @_Z16compound_literalIiEvv
33 // CHECK: call void @_ZN1XC1Ev
34 // CHECK-NEXT: call void @_ZN2X2D1Ev
35 // CHECK-NEXT: ret void
36 template void compound_literal<int>();