Skip to content

Commit 83e3779

Browse files
authored
[WebAssembly] Add intentations to type-checker-error.s (#111071)
1 parent 1753d16 commit 83e3779

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

llvm/test/MC/WebAssembly/type-checker-errors.s

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ end_block_insufficient_values_on_stack_2:
297297
end_block_type_mismatch:
298298
.functype end_block_type_mismatch () -> ()
299299
block i32
300-
f32.const 1.0
300+
f32.const 1.0
301301
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
302302
end_block
303303
drop
@@ -314,7 +314,7 @@ end_loop_insufficient_values_on_stack:
314314
end_loop_type_mismatch:
315315
.functype end_loop_type_mismatch () -> ()
316316
loop f32
317-
i32.const 1
317+
i32.const 1
318318
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
319319
end_loop
320320
drop
@@ -332,7 +332,7 @@ end_if_type_mismatch_1:
332332
.functype end_if_type_mismatch_1 () -> ()
333333
i32.const 1
334334
if f32
335-
i32.const 1
335+
i32.const 1
336336
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
337337
end_if
338338
drop
@@ -342,7 +342,7 @@ end_if_insufficient_values_on_stack_2:
342342
.functype end_if_insufficient_values_on_stack_2 () -> ()
343343
i32.const 1
344344
if i32
345-
i32.const 2
345+
i32.const 2
346346
else
347347
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
348348
end_if
@@ -353,9 +353,9 @@ end_if_type_mismatch_2:
353353
.functype end_if_type_mismatch_2 () -> ()
354354
i32.const 1
355355
if i32
356-
i32.const 2
356+
i32.const 2
357357
else
358-
f32.const 3.0
358+
f32.const 3.0
359359
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
360360
end_if
361361
drop
@@ -367,7 +367,7 @@ else_insufficient_values_on_stack:
367367
if i32
368368
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
369369
else
370-
i32.const 0
370+
i32.const 0
371371
end_if
372372
drop
373373
end_function
@@ -376,10 +376,10 @@ else_type_mismatch:
376376
.functype else_type_mismatch () -> ()
377377
i32.const 1
378378
if i32
379-
f32.const 0.0
379+
f32.const 0.0
380380
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
381381
else
382-
i32.const 0
382+
i32.const 0
383383
end_if
384384
drop
385385
end_function
@@ -390,7 +390,7 @@ else_type_mismatch:
390390
end_try_insufficient_values_on_stack:
391391
.functype end_try_insufficient_values_on_stack () -> ()
392392
try i32
393-
i32.const 0
393+
i32.const 0
394394
catch_all
395395
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
396396
end_try
@@ -400,7 +400,7 @@ end_try_insufficient_values_on_stack:
400400
end_try_type_mismatch:
401401
.functype end_try_type_mismatch () -> ()
402402
try i32
403-
i32.const 0
403+
i32.const 0
404404
catch tag_f32
405405
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
406406
end_try
@@ -419,7 +419,7 @@ catch_insufficient_values_on_stack:
419419
catch_type_mismatch:
420420
.functype catch_type_mismatch () -> ()
421421
try i32
422-
f32.const 1.0
422+
f32.const 1.0
423423
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
424424
catch tag_i32
425425
end_try
@@ -431,18 +431,18 @@ catch_all_insufficient_values_on_stack:
431431
try i32
432432
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
433433
catch_all
434-
i32.const 0
434+
i32.const 0
435435
end_try
436436
drop
437437
end_function
438438

439439
catch_all_type_mismatch:
440440
.functype catch_all_type_mismatch () -> ()
441441
try i32
442-
f32.const 1.0
442+
f32.const 1.0
443443
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
444444
catch_all
445-
i32.const 0
445+
i32.const 0
446446
end_try
447447
drop
448448
end_function
@@ -458,7 +458,7 @@ delegate_insufficient_values_on_stack:
458458
delegate_type_mismatch:
459459
.functype delegate_type_mismatch () -> ()
460460
try i32
461-
f32.const 1.0
461+
f32.const 1.0
462462
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
463463
delegate 0
464464
drop
@@ -679,7 +679,7 @@ other_insn_test_3:
679679
check_after_unreachable_within_block:
680680
.functype check_after_unreachable_within_block () -> ()
681681
block
682-
unreachable
682+
unreachable
683683
end_block
684684
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
685685
drop
@@ -689,7 +689,7 @@ check_after_unreachable_within_block:
689689
check_after_unreachable_within_loop:
690690
.functype check_after_unreachable_within_loop () -> ()
691691
loop
692-
unreachable
692+
unreachable
693693
end_loop
694694
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
695695
drop
@@ -700,9 +700,9 @@ check_after_unreachable_within_if_1:
700700
.functype check_after_unreachable_within_if_1 () -> ()
701701
i32.const 0
702702
if
703-
unreachable
703+
unreachable
704704
else
705-
unreachable
705+
unreachable
706706
end_if
707707
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
708708
drop
@@ -713,20 +713,20 @@ check_after_unreachable_within_if_2:
713713
.functype check_after_unreachable_within_if_2 () -> ()
714714
i32.const 0
715715
if
716-
unreachable
716+
unreachable
717717
else
718-
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
719-
drop
718+
# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
719+
drop
720720
end_if
721721
end_function
722722

723723
# Unreachable code within 'try' does not affect type checking after 'end_try'
724724
check_after_unreachable_within_try_1:
725725
.functype check_after_unreachable_within_try_1 () -> ()
726726
try
727-
unreachable
727+
unreachable
728728
catch_all
729-
unreachable
729+
unreachable
730730
end_try
731731
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
732732
drop
@@ -736,30 +736,30 @@ check_after_unreachable_within_try_1:
736736
check_after_unreachable_within_try_2:
737737
.functype check_after_unreachable_within_try_2 () -> ()
738738
try
739-
unreachable
739+
unreachable
740740
catch tag_i32
741-
drop
742-
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
743-
drop
741+
drop
742+
# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
743+
drop
744744
end_try
745745
end_function
746746

747747
# Unreachable code within 'try' does not affect type checking after 'catch_all'
748748
check_after_unreachable_within_try_3:
749749
.functype check_after_unreachable_within_try_3 () -> ()
750750
try
751-
unreachable
751+
unreachable
752752
catch_all
753-
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
754-
drop
753+
# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
754+
drop
755755
end_try
756756
end_function
757757

758758
# Unreachable code within 'try' does not affect type checking after 'delegate'
759759
check_after_unreachable_within_try_4:
760760
.functype check_after_unreachable_within_try_4 () -> ()
761761
try
762-
unreachable
762+
unreachable
763763
delegate 0
764764
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
765765
drop
@@ -838,12 +838,12 @@ br_invalid_type_catch_all:
838838
br_invalid_depth_out_of_range:
839839
.functype br_invalid_depth_out_of_range () -> ()
840840
block
841-
block
842-
block
843-
# CHECK: :[[@LINE+1]]:5: error: br: invalid depth 4
844-
br 4
845-
end_block
846-
end_block
841+
block
842+
block
843+
# CHECK: :[[@LINE+1]]:9: error: br: invalid depth 4
844+
br 4
845+
end_block
846+
end_block
847847
end_block
848848
end_function
849849

@@ -936,9 +936,9 @@ block_param_and_return:
936936
drop
937937

938938
block f32
939-
f32.const 0.0
940-
br 0
941-
i32.const 0
939+
f32.const 0.0
940+
br 0
941+
i32.const 0
942942
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [..., i32]
943943
end_block
944944

0 commit comments

Comments
 (0)