Lines Matching refs:catch

16 ; Simple test case with two catch clauses
22 ; } catch (int) {
23 ; } catch (double) {
30 ; CHECK: catch
48 to label %try.cont unwind label %catch.dispatch
50 catch.dispatch: ; preds = %entry
51 %0 = catchswitch within none [label %catch.start] unwind to caller
53 catch.start: ; preds = %catch.dispatch
59 br i1 %matches, label %catch2, label %catch.fallthrough
61 catch2: ; preds = %catch.start
66 catch.fallthrough: ; preds = %catch.start
69 br i1 %matches1, label %catch, label %rethrow
71 catch: ; preds = %catch.fallthrough
76 rethrow: ; preds = %catch.fallthrough
80 try.cont: ; preds = %catch, %catch2, %entry
84 ; Nested try-catches within a catch
88 ; } catch (int) {
91 ; } catch (int) {
100 ; CHECK: catch
109 ; CHECK: catch
119 ; CHECK: rethrow 0 # down to catch[[L4:[0-9+]]]
122 ; CHECK: rethrow 1 # down to catch[[L4]]
127 ; CHECK: catch_all # catch[[L4]]:
139 to label %try.cont11 unwind label %catch.dispatch
141 catch.dispatch: ; preds = %entry
142 %0 = catchswitch within none [label %catch.start] unwind to caller
144 catch.start: ; preds = %catch.dispatch
150 br i1 %matches, label %catch, label %rethrow
152 catch: ; preds = %catch.start
157 to label %try.cont unwind label %catch.dispatch2
159 catch.dispatch2: ; preds = %catch
160 %8 = catchswitch within %1 [label %catch.start3] unwind label %ehcleanup9
162 catch.start3: ; preds = %catch.dispatch2
170 catch6: ; preds = %catch.start3
181 rethrow5: ; preds = %catch.start3
185 try.cont: ; preds = %invoke.cont8, %catch
189 rethrow: ; preds = %catch.start
201 ehcleanup9: ; preds = %ehcleanup, %rethrow5, %catch.dispatch2
210 ; Nested loop within a catch clause
214 ; } catch (...) {
223 ; CHECK: catch
232 ; CHECK: catch
251 to label %try.cont unwind label %catch.dispatch
253 catch.dispatch: ; preds = %entry
254 %0 = catchswitch within none [label %catch.start] unwind to caller
256 catch.start: ; preds = %catch.dispatch
263 for.cond: ; preds = %for.inc, %catch.start
264 %i.0 = phi i32 [ 0, %catch.start ], [ %inc, %for.inc ]
312 ; NOOPT: catch {{.*}}
326 to label %try.cont unwind label %catch.dispatch
330 to label %try.cont unwind label %catch.dispatch
332 catch.dispatch: ; preds = %bb4, %bb3
333 %0 = catchswitch within none [label %catch.start] unwind to caller
335 catch.start: ; preds = %catch.dispatch
341 try.cont: ; preds = %catch.start, %bb4, %bb3, %bb2
351 ; CHECK: catch
362 to label %try.cont unwind label %catch.dispatch
364 catch.dispatch: ; preds = %loop
365 %0 = catchswitch within none [label %catch.start] unwind to caller
367 catch.start: ; preds = %catch.dispatch
373 try.cont: ; preds = %catch.start, %loop
390 ; try-catch with try-delegate that rethrows an exception to the caller to fix
395 ; --- try-delegate starts (catch unwind mismatch)
402 ; NOSORT: delegate 2 # label/catch{{[0-9]+}}: down to catch[[C0:[0-9]+]]
404 ; NOSORT: catch {{.*}} # catch[[C1:[0-9]+]]:
406 ; NOSORT: delegate 1 # label/catch{{[0-9]+}}: to caller
407 ; --- try-delegate ends (catch unwind mismatch)
408 ; NOSORT: catch {{.*}} # catch[[C0]]:
415 to label %bb1 unwind label %catch.dispatch0
419 to label %try.cont unwind label %catch.dispatch1
421 catch.dispatch0: ; preds = %bb0
422 %0 = catchswitch within none [label %catch.start0] unwind to caller
424 catch.start0: ; preds = %catch.dispatch0
430 catch.dispatch1: ; preds = %bb1
431 %4 = catchswitch within none [label %catch.start1] unwind to caller
433 catch.start1: ; preds = %catch.dispatch1
439 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
459 ; NOSORT: delegate 1 # label/catch{{[0-9]+}}: to caller
463 ; NOSORT: catch {{.*}} # catch[[C0:[0-9]+]]:
470 to label %bb1 unwind label %catch.dispatch0
478 catch.dispatch0: ; preds = %bb0
479 %0 = catchswitch within none [label %catch.start0] unwind to caller
481 catch.start0: ; preds = %catch.dispatch0
487 try.cont: ; preds = %catch.start0
493 ; unwinds to the caller and 'call @bar' unwinds to catch C0.
497 ; --- try-delegate starts (catch unwind mismatch)
504 ; NOSORT: delegate 3 # label/catch{{[0-9]+}}: to caller
509 ; NOSORT: delegate 2 # label/catch{{[0-9]+}}: down to catch[[C0:[0-9]+]]
511 ; NOSORT: catch {{.*}} # catch[[C1:[0-9]+]]:
513 ; NOSORT: delegate 1 # label/catch{{[0-9]+}}: to caller
514 ; --- try-delegate ends (catch unwind mismatch)
515 ; NOSORT: catch {{.*}} # catch[[C0]]:
522 to label %bb1 unwind label %catch.dispatch0
527 to label %try.cont unwind label %catch.dispatch1
529 catch.dispatch0: ; preds = %bb0
530 %0 = catchswitch within none [label %catch.start0] unwind to caller
532 catch.start0: ; preds = %catch.dispatch0
538 catch.dispatch1: ; preds = %bb1
539 %4 = catchswitch within none [label %catch.start1] unwind to caller
541 catch.start1: ; preds = %catch.dispatch1
547 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
567 ; NOSORT: delegate 1 # label/catch{{[0-9]+}}: to caller
570 ; NOSORT: catch {{.*}} # catch[[C0:[0-9]+]]:
577 to label %bb1 unwind label %catch.dispatch0
583 catch.dispatch0: ; preds = %bb0
584 %1 = catchswitch within none [label %catch.start0] unwind to caller
586 catch.start0: ; preds = %catch.dispatch0
592 try.cont: ; preds = %catch.start0
603 to label %bb1 unwind label %catch.dispatch0
623 catch.dispatch0: ; preds = %bb0
624 %0 = catchswitch within none [label %catch.start0] unwind to caller
626 catch.start0: ; preds = %catch.dispatch0
632 try.cont: ; preds = %catch.start0
641 ; We also have a catch unwind mismatch: If an exception is not caught by the
642 ; first catch because it is a non-C++ exception, it shouldn't unwind to the next
643 ; catch, but it should unwind to the caller.
647 ; --- try-delegate starts (catch unwind mismatch)
654 ; NOSORT: delegate 2 # label/catch{{[0-9]+}}: down to catch[[C0:[0-9]+]]
656 ; NOSORT: catch
661 ; NOSORT: delegate 3 # label/catch{{[0-9]+}}: to caller
664 ; NOSORT: delegate 1 # label/catch{{[0-9]+}}: to caller
665 ; --- try-delegate ends (catch unwind mismatch)
666 ; NOSORT: catch {{.*}} # catch[[C0]]:
675 to label %bb1 unwind label %catch.dispatch0
679 to label %try.cont unwind label %catch.dispatch1
681 catch.dispatch0: ; preds = %bb0
682 %0 = catchswitch within none [label %catch.start0] unwind to caller
684 catch.start0: ; preds = %catch.dispatch0
692 catch.dispatch1: ; preds = %bb1
693 %5 = catchswitch within none [label %catch.start1] unwind to caller
695 catch.start1: ; preds = %catch.dispatch1
703 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
710 ; this example, 'catch.start' should be sorted right after 'if.then' is sorted
718 ; NOOPT: catch
728 catch.dispatch: ; preds = %if.then
729 %0 = catchswitch within none [label %catch.start] unwind to caller
731 catch.start: ; preds = %catch.dispatch
741 to label %cont unwind label %catch.dispatch
747 if.end: ; preds = %cont, %catch.start, %entry
826 to label %for.inc unwind label %catch.dispatch
828 catch.dispatch: ; preds = %for.body
829 %0 = catchswitch within none [label %catch.start] unwind to caller
831 catch.start: ; preds = %catch.dispatch
837 br i1 %matches, label %catch, label %rethrow
839 catch: ; preds = %catch.start
849 invoke.cont2: ; preds = %catch
854 rethrow: ; preds = %catch.start
862 ehcleanup: ; preds = %catch
889 ; catch
897 to label %for.body unwind label %catch.dispatch
902 to label %for.end unwind label %catch.dispatch
914 ; CHECK: catch
916 catch.dispatch: ; preds = %for.body, %entry
917 %0 = catchswitch within none [label %catch.start] unwind to caller
919 catch.start: ; preds = %catch.dispatch
927 try.cont: ; preds = %catch.start, %for.end
937 ; } catch (...) {
939 ; } catch (...) {
954 ; catch
957 ; catch
967 to label %invoke.cont unwind label %catch.dispatch3
973 to label %try.cont8 unwind label %catch.dispatch
975 catch.dispatch: ; preds = %invoke.cont
976 %0 = catchswitch within none [label %catch.start] unwind label %catch.dispatch3
978 ; CHECK: catch
979 catch.start: ; preds = %catch.dispatch
985 to label %invoke.cont2 unwind label %catch.dispatch3
987 catch.dispatch3: ; preds = %catch.start, %catch.dispatch, %entry
988 %5 = catchswitch within none [label %catch.start4] unwind to caller
990 catch.start4: ; preds = %catch.dispatch3
998 try.cont8: ; preds = %invoke.cont2, %catch.start4, %invoke.c…
1001 invoke.cont2: ; preds = %catch.start
1027 to label %while.end unwind label %catch.dispatch
1029 catch.dispatch: ; preds = %while.body
1030 %0 = catchswitch within none [label %catch.start] unwind to caller
1032 catch.start: ; preds = %catch.dispatch
1040 invoke.cont: ; preds = %catch.start
1043 ehcleanup: ; preds = %catch.start
1126 ; This tests if invalidated branch destinations after fixing catch unwind
1128 ; we need to wrap this try-catch-end in this code with a try-delegate to fix a
1129 ; catch unwind mismatch:
1134 ; catch
1144 ; catch
1163 to label %bb1 unwind label %catch.dispatch0
1167 to label %try.cont unwind label %catch.dispatch1
1169 catch.dispatch0: ; preds = %bb0
1170 %0 = catchswitch within none [label %catch.start0] unwind to caller
1172 catch.start0: ; preds = %catch.dispatch0
1181 catch.dispatch1: ; preds = %bb1
1182 %4 = catchswitch within none [label %catch.start1] unwind to caller
1184 catch.start1: ; preds = %catch.dispatch1
1190 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
1200 ; catch
1212 ; catch
1227 to label %unreachable unwind label %catch.dispatch
1229 catch.dispatch: ; preds = %if.then
1230 %0 = catchswitch within none [label %catch.start] unwind to caller
1232 catch.start: ; preds = %catch.dispatch
1238 catchret.dest: ; preds = %catch.start
1240 to label %invoke.cont unwind label %catch.dispatch4
1244 to label %unreachable unwind label %catch.dispatch4
1246 catch.dispatch4: ; preds = %invoke.cont, %catchret.dest
1247 %4 = catchswitch within none [label %catch.start5] unwind to caller
1249 catch.start5: ; preds = %catch.dispatch4
1257 to label %invoke.cont14 unwind label %catch.dispatch16
1259 catch.dispatch16: ; preds = %if.end12
1260 %8 = catchswitch within none [label %catch.start17] unwind label %ehcleanup
1262 catch.start17: ; preds = %catch.dispatch16
1268 catch20: ; preds = %catch.start17
1274 rethrow19: ; preds = %catch.start17
1288 ehcleanup: ; preds = %try.cont23, %rethrow19, %catch.dispatc…
1302 to label %invoke.cont unwind label %catch.dispatch
1304 catch.dispatch: ; preds = %entry
1305 %0 = catchswitch within none [label %catch.start] unwind label %ehcleanup22
1307 catch.start: ; preds = %catch.dispatch
1312 to label %unreachable unwind label %catch.dispatch2
1314 catch.dispatch2: ; preds = %catch.start
1315 %4 = catchswitch within %1 [label %catch.start3] unwind label %ehcleanup
1317 catch.start3: ; preds = %catch.dispatch2
1323 try.cont: ; preds = %catch.start3
1329 to label %unreachable unwind label %catch.dispatch11
1331 catch.dispatch11: ; preds = %invoke.cont8
1332 %8 = catchswitch within %1 [label %catch.start12] unwind label %ehcleanup
1334 catch.start12: ; preds = %catch.dispatch11
1343 ehcleanup: ; preds = %catch.dispatch11, %try.cont, %catch.di…
1347 ehcleanup22: ; preds = %ehcleanup, %catch.dispatch
1351 unreachable: ; preds = %invoke.cont8, %catch.start
1359 ; } catch (int) {
1361 ; } catch (int) {
1366 ; are removed, EH pad catch.start2 is dominated by catch.start, but because
1367 ; catch.start2 is the unwind destination of catch.start, it should not be
1368 ; included in catch.start's exception. Also, after we take catch.start2's
1369 ; exception out of catch.start's exception, we have to take out try.cont8 out of
1370 ; catch.start's exception, because it has a predecessor in catch.start2.
1377 to label %unreachable unwind label %catch.dispatch
1379 catch.dispatch: ; preds = %entry
1380 %1 = catchswitch within none [label %catch.start] unwind label %catch.dispatch1
1382 catch.start: ; preds = %catch.dispatch
1388 br i1 %matches, label %catch, label %rethrow
1390 catch: ; preds = %catch.start
1397 catchret.dest: ; preds = %catch
1400 rethrow: ; preds = %catch.start
1402 to label %unreachable unwind label %catch.dispatch1
1404 catch.dispatch1: ; preds = %rethrow, %catch.dispatch
1405 %9 = catchswitch within none [label %catch.start2] unwind to caller
1407 catch.start2: ; preds = %catch.dispatch1
1415 catch5: ; preds = %catch.start2
1425 rethrow4: ; preds = %catch.start2
1441 ; catch.start dominates catch.start4 and catch.start4 dominates catch.start12,
1443 ; catch.start's exception > catch4.start's exception > catch12.start's exception
1446 ; But the unwind destination chain is catch.start -> catch.start4 ->
1447 ; catch.start12. So all these subexception relationship should be deconstructed.
1448 ; We have to make sure to take out catch.start4's exception out of catch.start's
1449 ; exception first, before taking out catch.start12's exception out of
1450 ; catch.start4's exception; otherwise we end up with an incorrect relationship
1451 ; of catch.start's exception > catch.start12's exception.
1456 to label %invoke.cont unwind label %catch.dispatch
1460 to label %invoke.cont1 unwind label %catch.dispatch
1464 to label %try.cont18 unwind label %catch.dispatch
1466 catch.dispatch11: ; preds = %rethrow6, %catch.dispatch3
1467 %0 = catchswitch within none [label %catch.start12] unwind to caller
1469 catch.start12: ; preds = %catch.dispatch11
1477 catch15: ; preds = %catch.start12
1484 rethrow14: ; preds = %catch.start12
1488 catch.dispatch3: ; preds = %rethrow, %catch.dispatch
1489 %8 = catchswitch within none [label %catch.start4] unwind label %catch.dispatch11
1491 catch.start4: ; preds = %catch.dispatch3
1499 catch7: ; preds = %catch.start4
1506 rethrow6: ; preds = %catch.start4
1508 to label %unreachable unwind label %catch.dispatch11
1510 catch.dispatch: ; preds = %invoke.cont1, %invoke.cont, %entry
1511 %16 = catchswitch within none [label %catch.start] unwind label %catch.dispatch3
1513 catch.start: ; preds = %catch.dispatch
1519 br i1 %matches, label %catch, label %rethrow
1521 catch: ; preds = %catch.start
1528 rethrow: ; preds = %catch.start
1530 to label %unreachable unwind label %catch.dispatch3
1532 try.cont18: ; preds = %catch, %catch7, %catch15, %invoke.cont1
1543 ; } catch (int) { // (a)
1545 ; } catch (int) { // (b)
1549 ; } catch (int) { // (c)
1554 ; try always throws, both EH pads (b) (catch.start2) and (c) (catch.start10) are
1555 ; dominated by EH pad (a) (catch.start), even though they are not semantically
1565 to label %unreachable unwind label %catch.dispatch
1567 catch.dispatch: ; preds = %entry
1568 %1 = catchswitch within none [label %catch.start] unwind label %catch.dispatch1
1570 catch.start: ; preds = %catch.dispatch
1576 br i1 %matches, label %catch, label %rethrow
1578 catch: ; preds = %catch.start
1585 rethrow: ; preds = %catch.start
1587 to label %unreachable unwind label %catch.dispatch1
1589 catch.dispatch1: ; preds = %rethrow, %catch.dispatch
1590 %9 = catchswitch within none [label %catch.start2] unwind to caller
1592 catch.start2: ; preds = %catch.dispatch1
1600 catch5: ; preds = %catch.start2
1607 rethrow4: ; preds = %catch.start2
1611 try.cont8: ; preds = %catch, %catch5
1613 to label %try.cont16 unwind label %catch.dispatch9
1615 catch.dispatch9: ; preds = %try.cont8
1616 %17 = catchswitch within none [label %catch.start10] unwind to caller
1618 catch.start10: ; preds = %catch.dispatch9
1626 catch13: ; preds = %catch.start10
1633 rethrow12: ; preds = %catch.start10
1646 ; NOSORT: 4 wasm-cfg-stackify - Number of catch unwind mismatches found