Skip to content

Commit 3aef8a0

Browse files
[clang-repl] Add test for explicit emission of dtors in the runtime interface builder
1 parent 662b130 commit 3aef8a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// UNSUPPORTED: system-aix
2+
3+
// RUN: cat %s | clang-repl | FileCheck %s
4+
int *x = new int();
5+
template <class T> struct GuardX { T *&x; GuardX(T *&x) : x(x) {}; ~GuardX(); };
6+
template <class T> GuardX<T>::~GuardX() { delete x; x = nullptr; }
7+
8+
// clang would normally defer codegen for ~GuardX()
9+
// Make sure that RuntimeInterfaceBuilder requests it explicitly
10+
(GuardX(x))
11+
12+
// CHECK-NOT: Symbols not found
13+
// CHECK-NOT: _ZN6GuardXIiED2Ev

0 commit comments

Comments
 (0)