Lines Matching full:catch

15 ; Simple test case with two catch clauses
21 ; } catch (int) {
22 ; } catch (double) {
29 ; CHECK: catch
47 to label %try.cont unwind label %catch.dispatch
49 catch.dispatch: ; preds = %entry
50 %0 = catchswitch within none [label %catch.start] unwind to caller
52 catch.start: ; preds = %catch.dispatch
58 br i1 %matches, label %catch2, label %catch.fallthrough
60 catch2: ; preds = %catch.start
65 catch.fallthrough: ; preds = %catch.start
68 br i1 %matches1, label %catch, label %rethrow
70 catch: ; preds = %catch.fallthrough
75 rethrow: ; preds = %catch.fallthrough
76 call void @llvm.wasm.rethrow.in.catch() [ "funclet"(token %1) ]
79 try.cont: ; preds = %catch, %catch2, %entry
83 ; Nested try-catches within a catch
87 ; } catch (int) {
90 ; } catch (int) {
99 ; CHECK: catch
107 ; CHECK: catch
115 ; CHECK: catch
121 ; CHECK: catch {{.*}} # catch3:
136 to label %try.cont11 unwind label %catch.dispatch
138 catch.dispatch: ; preds = %entry
139 %0 = catchswitch within none [label %catch.start] unwind to caller
141 catch.start: ; preds = %catch.dispatch
147 br i1 %matches, label %catch, label %rethrow
149 catch: ; preds = %catch.start
154 to label %try.cont unwind label %catch.dispatch2
156 catch.dispatch2: ; preds = %catch
157 %8 = catchswitch within %1 [label %catch.start3] unwind label %ehcleanup9
159 catch.start3: ; preds = %catch.dispatch2
167 catch6: ; preds = %catch.start3
178 rethrow5: ; preds = %catch.start3
179 invoke void @llvm.wasm.rethrow.in.catch() [ "funclet"(token %9) ]
182 try.cont: ; preds = %invoke.cont8, %catch
186 rethrow: ; preds = %catch.start
187 call void @llvm.wasm.rethrow.in.catch() [ "funclet"(token %1) ]
198 ehcleanup9: ; preds = %ehcleanup, %rethrow5, %catch.dispatch2
207 ; Nested loop within a catch clause
211 ; } catch (...) {
220 ; CHECK: catch
229 ; CHECK: catch
232 ; CHECK: catch
248 to label %try.cont unwind label %catch.dispatch
250 catch.dispatch: ; preds = %entry
251 %0 = catchswitch within none [label %catch.start] unwind to caller
253 catch.start: ; preds = %catch.dispatch
260 for.cond: ; preds = %for.inc, %catch.start
261 %i.0 = phi i32 [ 0, %catch.start ], [ %inc, %for.inc ]
310 ; NOOPT: catch {{.*}}
324 to label %try.cont unwind label %catch.dispatch
328 to label %try.cont unwind label %catch.dispatch
330 catch.dispatch: ; preds = %bb4, %bb3
331 %0 = catchswitch within none [label %catch.start] unwind to caller
333 catch.start: ; preds = %catch.dispatch
339 try.cont: ; preds = %catch.start, %bb4, %bb3, %bb2
349 ; CHECK: catch
360 to label %try.cont unwind label %catch.dispatch
362 catch.dispatch: ; preds = %loop
363 %0 = catchswitch within none [label %catch.start] unwind to caller
365 catch.start: ; preds = %catch.dispatch
371 try.cont: ; preds = %catch.start, %loop
382 ; this by wrapping the call with a nested try/catch/end_try and branching to the
390 ; --- Nested try/catch/end_try starts
393 ; NOSORT: catch $drop=
396 ; --- Nested try/catch/end_try ends
398 ; NOSORT: catch $drop= # catch15:
401 ; NOSORT: catch $drop= # catch14:
409 to label %bb1 unwind label %catch.dispatch0
413 to label %try.cont unwind label %catch.dispatch1
415 catch.dispatch0: ; preds = %bb0
416 %0 = catchswitch within none [label %catch.start0] unwind to caller
418 catch.start0: ; preds = %catch.dispatch0
424 catch.dispatch1: ; preds = %bb1
425 %4 = catchswitch within none [label %catch.start1] unwind to caller
427 catch.start1: ; preds = %catch.dispatch1
433 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
439 ; fix this by wrapping the call with a nested try/catch/end_try and branching to
449 ; --- Nested try/catch/end_try starts
454 ; NOSORT: catch $[[REG:[0-9]+]]=
457 ; --- Nested try/catch/end_try ends
459 ; NOSORT: catch $drop= # catch17:
467 to label %bb1 unwind label %catch.dispatch0
475 catch.dispatch0: ; preds = %bb0
476 %0 = catchswitch within none [label %catch.start0] unwind to caller
478 catch.start0: ; preds = %catch.dispatch0
484 try.cont: ; preds = %catch.start0
490 ; incorrectly becomes another catch within the function. We fix this by wrapping
491 ; the call with a nested try/catch/end_try and branching to the right
501 ; --- Nested try/catch/end_try starts
505 ; NOSORT: catch $[[REG:[0-9]+]]=
508 ; --- Nested try/catch/end_try ends
510 ; NOSORT: catch $drop= # catch19:
518 to label %bb1 unwind label %catch.dispatch0
524 catch.dispatch0: ; preds = %bb0
525 %1 = catchswitch within none [label %catch.start0] unwind to caller
527 catch.start0: ; preds = %catch.dispatch0
533 try.cont: ; preds = %catch.start0
544 to label %bb1 unwind label %catch.dispatch0
551 ; But when we introduce a nested try-catch in fixUnwindMismatches in
564 catch.dispatch0: ; preds = %bb0
565 %0 = catchswitch within none [label %catch.start0] unwind to caller
567 catch.start0: ; preds = %catch.dispatch0
573 try.cont: ; preds = %catch.start0
589 ; --- Nested try/catch/end_try starts
593 ; NOSORT: catch $[[REG:[0-9]+]]=
596 ; --- Nested try/catch/end_try ends
598 ; NOSORT: catch $drop= # catch23:
613 to label %bb unwind label %catch.dispatch
620 catch.dispatch: ; preds = %loop
621 %0 = catchswitch within none [label %catch.start] unwind to caller
623 catch.start: ; preds = %catch.dispatch
629 try.cont: ; preds = %catch.start
645 ; --- Nested try/catch/end_try starts
648 ; NOSORT: catch $[[REG0:[0-9]+]]=
651 ; --- Nested try/catch/end_try ends
653 ; NOSORT: catch {{.*}}
656 ; --- Nested try/catch/end_try starts
659 ; NOSORT: catch $[[REG1:[0-9]+]]= # catch28:
662 ; --- Nested try/catch/end_try ends
665 ; --- Nested try/catch/end_try starts
668 ; NOSORT: catch $[[REG1]]=
671 ; --- Nested try/catch/end_try ends
674 ; NOSORT: catch $[[REG0]]=
685 to label %bb1 unwind label %catch.dispatch0
689 to label %try.cont unwind label %catch.dispatch1
691 catch.dispatch0: ; preds = %bb0
692 %0 = catchswitch within none [label %catch.start0] unwind to caller
694 catch.start0: ; preds = %catch.dispatch0
702 catch.dispatch1: ; preds = %bb1
703 %5 = catchswitch within none [label %catch.start1] unwind to caller
705 catch.start1: ; preds = %catch.dispatch1
713 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
720 ; this example, 'catch.start' should be sorted right after 'if.then' is sorted
727 ; NOOPT: catch
737 catch.dispatch: ; preds = %if.then
738 %0 = catchswitch within none [label %catch.start] unwind to caller
740 catch.start: ; preds = %catch.dispatch
750 to label %cont unwind label %catch.dispatch
756 if.end: ; preds = %cont, %catch.start, %entry
776 ; NOSORT: catch
840 to label %for.inc unwind label %catch.dispatch
842 catch.dispatch: ; preds = %for.body
843 %0 = catchswitch within none [label %catch.start] unwind to caller
845 catch.start: ; preds = %catch.dispatch
851 br i1 %matches, label %catch, label %rethrow
853 catch: ; preds = %catch.start
863 invoke.cont2: ; preds = %catch
868 rethrow: ; preds = %catch.start
869 call void @llvm.wasm.rethrow.in.catch() #6 [ "funclet"(token %1) ]
876 ehcleanup: ; preds = %catch
903 to label %bb0 unwind label %catch.dispatch0
911 to label %try.cont unwind label %catch.dispatch1
913 catch.dispatch0: ; preds = %loop
914 %0 = catchswitch within none [label %catch.start0] unwind to caller
916 catch.start0: ; preds = %catch.dispatch0
922 catch.dispatch1: ; preds = %bb1
923 %4 = catchswitch within none [label %catch.start1] unwind to caller
925 catch.start1: ; preds = %catch.dispatch1
931 try.cont: ; preds = %catch.start1, %catch.start0, %bb1
944 to label %for.body unwind label %catch.dispatch
949 to label %for.end unwind label %catch.dispatch
961 ; CHECK: catch
963 catch.dispatch: ; preds = %for.body, %entry
964 %0 = catchswitch within none [label %catch.start] unwind to caller
966 catch.start: ; preds = %catch.dispatch
974 try.cont: ; preds = %catch.start, %for.end
1000 to label %while.end unwind label %catch.dispatch
1002 catch.dispatch: ; preds = %while.body
1003 %0 = catchswitch within none [label %catch.start] unwind to caller
1005 catch.start: ; preds = %catch.dispatch
1013 invoke.cont: ; preds = %catch.start
1016 ehcleanup: ; preds = %catch.start
1030 ; before its corresponding `catch`, because both `try` and `catch` body should
1037 ; NOSORT: catch
1098 declare void @llvm.wasm.rethrow.in.catch()