Update codegen tests with unnamed arguments

This commit is contained in:
Nikita Popov 2019-12-31 16:05:11 +01:00
parent 3d8f454cd0
commit e365bc7435
5 changed files with 8 additions and 8 deletions

View file

@ -7,4 +7,4 @@
fn main() {
}
// CHECK: define i32 @main(i32, i8**)
// CHECK: define i32 @main(i32{{( %0)?}}, i8**{{( %1)?}})

View file

@ -73,7 +73,7 @@ pub fn _box(x: Box<i32>) -> Box<i32> {
x
}
// CHECK: @struct_return(%S* noalias nocapture sret dereferenceable(32))
// CHECK: @struct_return(%S* noalias nocapture sret dereferenceable(32){{( %0)?}})
#[no_mangle]
pub fn struct_return() -> S {
S {
@ -117,7 +117,7 @@ pub fn str(_: &[u8]) {
pub fn trait_borrow(_: &Drop) {
}
// CHECK: @trait_box({}* noalias nonnull align 1, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}))
// CHECK: @trait_box({}* noalias nonnull align 1{{( %0)?}}, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}})
#[no_mangle]
pub fn trait_box(_: Box<Drop>) {
}

View file

@ -17,7 +17,7 @@ pub fn naked_empty() {
// CHECK: Function Attrs: naked
#[no_mangle]
#[naked]
// CHECK-NEXT: define void @naked_with_args(i{{[0-9]+}})
// CHECK-NEXT: define void @naked_with_args(i{{[0-9]+( %0)?}})
pub fn naked_with_args(a: isize) {
// CHECK-NEXT: {{.+}}:
// CHECK-NEXT: %a = alloca i{{[0-9]+}}
@ -36,7 +36,7 @@ pub fn naked_with_return() -> isize {
}
// CHECK: Function Attrs: naked
// CHECK-NEXT: define i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}})
// CHECK-NEXT: define i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+( %0)?}})
#[no_mangle]
#[naked]
pub fn naked_with_args_and_return(a: isize) -> isize {

View file

@ -10,7 +10,7 @@ pub struct Rgb8 { r: u8, g: u8, b: u8 }
#[repr(transparent)]
pub struct Rgb8Wrap(Rgb8);
// CHECK: i24 @test_Rgb8Wrap(i24)
// CHECK: i24 @test_Rgb8Wrap(i24{{( %0)?}})
#[no_mangle]
pub extern "sysv64" fn test_Rgb8Wrap(_: Rgb8Wrap) -> Rgb8Wrap { loop {} }
@ -23,6 +23,6 @@ pub union FloatBits {
#[repr(transparent)]
pub struct SmallUnion(FloatBits);
// CHECK: i32 @test_SmallUnion(i32)
// CHECK: i32 @test_SmallUnion(i32{{( %0)?}})
#[no_mangle]
pub extern "sysv64" fn test_SmallUnion(_: SmallUnion) -> SmallUnion { loop {} }

View file

@ -54,7 +54,7 @@ pub fn test_UnionF32F32(_: UnionF32F32) -> UnionF32F32 { loop {} }
pub union UnionF32U32{a:f32, b:u32}
// CHECK: define i32 @test_UnionF32U32(i32)
// CHECK: define i32 @test_UnionF32U32(i32{{( %0)?}})
#[no_mangle]
pub fn test_UnionF32U32(_: UnionF32U32) -> UnionF32U32 { loop {} }