aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-03-16 20:11:11 +0100
committerDamian Gryski <[email protected]>2023-03-16 13:46:03 -0700
commitec3a4da4df42526550037a3dbfcc7a41afd1428e (patch)
tree2ccd20c215ef56be210f7d3320d70f751460ec01 /transform
parent905269bf1150c63153c46145ae62e36d7df42e19 (diff)
downloadtinygo-ec3a4da4df42526550037a3dbfcc7a41afd1428e.tar.gz
tinygo-ec3a4da4df42526550037a3dbfcc7a41afd1428e.zip
transform: update panic test to opaque pointers
Diffstat (limited to 'transform')
-rw-r--r--transform/testdata/panic.ll10
-rw-r--r--transform/testdata/panic.out.ll10
2 files changed, 10 insertions, 10 deletions
diff --git a/transform/testdata/panic.ll b/transform/testdata/panic.ll
index 4f0f0a167..660e30f2f 100644
--- a/transform/testdata/panic.ll
+++ b/transform/testdata/panic.ll
@@ -3,12 +3,12 @@ target triple = "armv7m-none-eabi"
@"runtime.lookupPanic$string" = constant [18 x i8] c"index out of range"
-declare void @runtime.runtimePanic(i8*, i32)
+declare void @runtime.runtimePanic(ptr, i32)
-declare void @runtime._panic(i32, i8*)
+declare void @runtime._panic(i32, ptr)
define void @runtime.lookupPanic() {
- call void @runtime.runtimePanic(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"runtime.lookupPanic$string", i64 0, i64 0), i32 18)
+ call void @runtime.runtimePanic(ptr @"runtime.lookupPanic$string", i32 18)
ret void
}
@@ -16,7 +16,7 @@ define void @runtime.lookupPanic() {
; func someFunc(x interface{}) {
; panic(x)
; }
-define void @someFunc(i32 %typecode, i8* %value) {
- call void @runtime._panic(i32 %typecode, i8* %value)
+define void @someFunc(i32 %typecode, ptr %value) {
+ call void @runtime._panic(i32 %typecode, ptr %value)
unreachable
}
diff --git a/transform/testdata/panic.out.ll b/transform/testdata/panic.out.ll
index 8612ae9a6..458e4c247 100644
--- a/transform/testdata/panic.out.ll
+++ b/transform/testdata/panic.out.ll
@@ -3,19 +3,19 @@ target triple = "armv7m-none-eabi"
@"runtime.lookupPanic$string" = constant [18 x i8] c"index out of range"
-declare void @runtime.runtimePanic(i8*, i32)
+declare void @runtime.runtimePanic(ptr, i32)
-declare void @runtime._panic(i32, i8*)
+declare void @runtime._panic(i32, ptr)
define void @runtime.lookupPanic() {
call void @llvm.trap()
- call void @runtime.runtimePanic(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"runtime.lookupPanic$string", i64 0, i64 0), i32 18)
+ call void @runtime.runtimePanic(ptr @"runtime.lookupPanic$string", i32 18)
ret void
}
-define void @someFunc(i32 %typecode, i8* %value) {
+define void @someFunc(i32 %typecode, ptr %value) {
call void @llvm.trap()
- call void @runtime._panic(i32 %typecode, i8* %value)
+ call void @runtime._panic(i32 %typecode, ptr %value)
unreachable
}