1 // compile-flags: -C no-prepopulate-passes
7 impl Drop for SomeUniqueName {
12 pub fn possibly_unwinding() {
15 // CHECK-LABEL: @droppy
18 // Check that there are exactly 6 drop calls. The cleanups for the unwinding should be reused, so
19 // that's one new drop call per call to possibly_unwinding(), and finally 3 drop calls for the
20 // regular function exit. We used to have problems with quadratic growths of drop calls in such
22 // CHECK-NOT: invoke{{.*}}drop{{.*}}SomeUniqueName
23 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
24 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
25 // CHECK-NOT: call{{.*}}drop{{.*}}SomeUniqueName
26 // CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
27 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
28 // CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
29 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
30 // CHECK-NOT: {{(call|invoke).*}}drop{{.*}}SomeUniqueName
31 // The next line checks for the } that ends the function definition
32 // CHECK-LABEL: {{^[}]}}
33 let _s = SomeUniqueName;
35 let _s = SomeUniqueName;
37 let _s = SomeUniqueName;