[llvm] 83e3779 - [WebAssembly] Add intentations to type-checker-error.s (#111071)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 17:32:46 PDT 2024


Author: Heejin Ahn
Date: 2024-10-03T17:32:43-07:00
New Revision: 83e3779473bf7e68a4030286cfc218ab3a1a31b8

URL: https://github.com/llvm/llvm-project/commit/83e3779473bf7e68a4030286cfc218ab3a1a31b8
DIFF: https://github.com/llvm/llvm-project/commit/83e3779473bf7e68a4030286cfc218ab3a1a31b8.diff

LOG: [WebAssembly] Add intentations to type-checker-error.s (#111071)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/WebAssembly/type-checker-errors.s b/llvm/test/MC/WebAssembly/type-checker-errors.s
index df537a9ba5d0a0..c5187d10fdca07 100644
--- a/llvm/test/MC/WebAssembly/type-checker-errors.s
+++ b/llvm/test/MC/WebAssembly/type-checker-errors.s
@@ -297,7 +297,7 @@ end_block_insufficient_values_on_stack_2:
 end_block_type_mismatch:
   .functype end_block_type_mismatch () -> ()
   block i32
-  f32.const 1.0
+    f32.const 1.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   end_block
   drop
@@ -314,7 +314,7 @@ end_loop_insufficient_values_on_stack:
 end_loop_type_mismatch:
   .functype end_loop_type_mismatch () -> ()
   loop f32
-  i32.const 1
+    i32.const 1
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
   end_loop
   drop
@@ -332,7 +332,7 @@ end_if_type_mismatch_1:
   .functype end_if_type_mismatch_1 () -> ()
   i32.const 1
   if f32
-  i32.const 1
+    i32.const 1
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
   end_if
   drop
@@ -342,7 +342,7 @@ end_if_insufficient_values_on_stack_2:
   .functype end_if_insufficient_values_on_stack_2 () -> ()
   i32.const 1
   if i32
-  i32.const 2
+    i32.const 2
   else
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
   end_if
@@ -353,9 +353,9 @@ end_if_type_mismatch_2:
   .functype end_if_type_mismatch_2 () -> ()
   i32.const 1
   if i32
-  i32.const 2
+    i32.const 2
   else
-  f32.const 3.0
+    f32.const 3.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   end_if
   drop
@@ -367,7 +367,7 @@ else_insufficient_values_on_stack:
   if i32
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
   else
-  i32.const 0
+    i32.const 0
   end_if
   drop
   end_function
@@ -376,10 +376,10 @@ else_type_mismatch:
   .functype else_type_mismatch () -> ()
   i32.const 1
   if i32
-  f32.const 0.0
+    f32.const 0.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   else
-  i32.const 0
+    i32.const 0
   end_if
   drop
   end_function
@@ -390,7 +390,7 @@ else_type_mismatch:
 end_try_insufficient_values_on_stack:
   .functype end_try_insufficient_values_on_stack () -> ()
   try i32
-  i32.const 0
+    i32.const 0
   catch_all
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
   end_try
@@ -400,7 +400,7 @@ end_try_insufficient_values_on_stack:
 end_try_type_mismatch:
   .functype end_try_type_mismatch () -> ()
   try i32
-  i32.const 0
+    i32.const 0
   catch tag_f32
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   end_try
@@ -419,7 +419,7 @@ catch_insufficient_values_on_stack:
 catch_type_mismatch:
   .functype catch_type_mismatch () -> ()
   try i32
-  f32.const 1.0
+    f32.const 1.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   catch tag_i32
   end_try
@@ -431,7 +431,7 @@ catch_all_insufficient_values_on_stack:
   try i32
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
   catch_all
-  i32.const 0
+    i32.const 0
   end_try
   drop
   end_function
@@ -439,10 +439,10 @@ catch_all_insufficient_values_on_stack:
 catch_all_type_mismatch:
   .functype catch_all_type_mismatch () -> ()
   try i32
-  f32.const 1.0
+    f32.const 1.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   catch_all
-  i32.const 0
+    i32.const 0
   end_try
   drop
   end_function
@@ -458,7 +458,7 @@ delegate_insufficient_values_on_stack:
 delegate_type_mismatch:
   .functype delegate_type_mismatch () -> ()
   try i32
-  f32.const 1.0
+    f32.const 1.0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
   delegate 0
   drop
@@ -679,7 +679,7 @@ other_insn_test_3:
 check_after_unreachable_within_block:
   .functype check_after_unreachable_within_block () -> ()
   block
-  unreachable
+    unreachable
   end_block
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
   drop
@@ -689,7 +689,7 @@ check_after_unreachable_within_block:
 check_after_unreachable_within_loop:
   .functype check_after_unreachable_within_loop () -> ()
   loop
-  unreachable
+    unreachable
   end_loop
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
   drop
@@ -700,9 +700,9 @@ check_after_unreachable_within_if_1:
   .functype check_after_unreachable_within_if_1 () -> ()
   i32.const 0
   if
-  unreachable
+    unreachable
   else
-  unreachable
+    unreachable
   end_if
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
   drop
@@ -713,10 +713,10 @@ check_after_unreachable_within_if_2:
   .functype check_after_unreachable_within_if_2 () -> ()
   i32.const 0
   if
-  unreachable
+    unreachable
   else
-# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
-  drop
+# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
+    drop
   end_if
   end_function
 
@@ -724,9 +724,9 @@ check_after_unreachable_within_if_2:
 check_after_unreachable_within_try_1:
   .functype check_after_unreachable_within_try_1 () -> ()
   try
-  unreachable
+    unreachable
   catch_all
-  unreachable
+    unreachable
   end_try
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
   drop
@@ -736,11 +736,11 @@ check_after_unreachable_within_try_1:
 check_after_unreachable_within_try_2:
   .functype check_after_unreachable_within_try_2 () -> ()
   try
-  unreachable
+    unreachable
   catch tag_i32
-  drop
-# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
-  drop
+    drop
+# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
+    drop
   end_try
   end_function
 
@@ -748,10 +748,10 @@ check_after_unreachable_within_try_2:
 check_after_unreachable_within_try_3:
   .functype check_after_unreachable_within_try_3 () -> ()
   try
-  unreachable
+    unreachable
   catch_all
-# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
-  drop
+# CHECK: :[[@LINE+1]]:5: error: type mismatch, expected [any] but got []
+    drop
   end_try
   end_function
 
@@ -759,7 +759,7 @@ check_after_unreachable_within_try_3:
 check_after_unreachable_within_try_4:
   .functype check_after_unreachable_within_try_4 () -> ()
   try
-  unreachable
+    unreachable
   delegate 0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
   drop
@@ -838,12 +838,12 @@ br_invalid_type_catch_all:
 br_invalid_depth_out_of_range:
   .functype br_invalid_depth_out_of_range () -> ()
   block
-  block
-  block
-# CHECK: :[[@LINE+1]]:5: error: br: invalid depth 4
-    br 4
-  end_block
-  end_block
+    block
+      block
+# CHECK: :[[@LINE+1]]:9: error: br: invalid depth 4
+        br 4
+      end_block
+    end_block
   end_block
   end_function
 
@@ -936,9 +936,9 @@ block_param_and_return:
   drop
 
   block f32
-  f32.const 0.0
-  br 0
-  i32.const 0
+    f32.const 0.0
+    br 0
+    i32.const 0
 # CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [..., i32]
   end_block
 


        


More information about the llvm-commits mailing list