Change printfln to printfn. Make LLVM 15 tests default.

This commit is contained in:
Christoffer Lerno
2023-01-11 17:27:54 +01:00
committed by Christoffer Lerno
parent 3298ff2e15
commit dc16f65c8e
971 changed files with 30632 additions and 30623 deletions

View File

@@ -9,14 +9,16 @@ fn void test()
/* #expect: literal_to_subarray.ll
%"char[]" = type { i8*, i64 }
%"char[]" = type { ptr, i64 }
@.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1
@literal_to_subarray_y = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 5 }, align 8
@literal_to_subarray_y = local_unnamed_addr global %"char[]" { ptr @.str, i64 5 }, align 8
@.str.1 = private unnamed_addr constant [6 x i8] c"world\00", align 1
; Function Attrs: nounwind
define void @literal_to_subarray_test() #0 {
entry:
%x = alloca %"char[]", align 8
store %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 5 }, %"char[]"* %x, align 8
store %"char[]" { ptr @.str.1, i64 5 }, ptr %x, align 8
ret void
}

View File

@@ -10,12 +10,12 @@ fn void main()
define void @string_escape_main() #0 {
entry:
%s = alloca i8*, align 8
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0), i8** %s, align 8
%s = alloca ptr, align 8
store ptr @.str, ptr %s, align 8
ret void
}
define i32 @main(i32 %0, i8** %1) #0 {
define i32 @main(i32 %0, ptr %1) #0 {
entry:
call void @string_escape_main()
ret i32 0

View File

@@ -17,9 +17,7 @@ define i32 @main() #0 {
entry:
%x = alloca [2 x i8], align 1
%y = alloca [3 x i8], align 1
%0 = bitcast [2 x i8]* %x to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %0, i8* align 1 getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 2, i1 false)
%1 = bitcast [3 x i8]* %y to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %1, i8* align 1 getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i32 3, i1 false)
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %x, ptr align 1 @.str, i32 2, i1 false)
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %y, ptr align 1 @.str.1, i32 3, i1 false)
ret i32 0
}