Add and use DominatorTreeBase::findNearestCommonDominator().
[llvm-complete.git] / test / C++Frontend / 2003-11-29-DuplicatedCleanupTest.cpp
blob8131baafae7e930b003fcdd56c2f01e412e879eb
1 // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
4 void doesntThrow() throw();
5 struct F {
6 ~F() { doesntThrow(); }
7 };
9 void atest() {
10 F A;
11 lab:
12 F B;
13 goto lab;
16 void test(int val) {
17 label: {
18 F A;
19 F B;
20 if (val == 0) goto label;
21 if (val == 1) goto label;
25 void test3(int val) {
26 label: {
27 F A;
28 F B;
29 if (val == 0) { doesntThrow(); goto label; }
30 if (val == 1) { doesntThrow(); goto label; }
34 void test4(int val) {
35 label: {
36 F A;
37 F B;
38 if (val == 0) { F C; goto label; }
39 if (val == 1) { F D; goto label; }