diff options
| author | bors <bors@rust-lang.org> | 2022-05-29 14:12:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-29 14:12:42 +0000 |
| commit | 9d1aeaeb827da7a10b7cfaccf0a1d6ebf414a7b5 (patch) | |
| tree | 29ff4633cbd3297d37ddd756a6402fe929ea6721 /src/test/codegen/function-arguments-noopt.rs | |
| parent | abc7681a76c7aa5adef896b85c3894047a4492d4 (diff) | |
| parent | 1ff051a9c53511473a12a37fe772e8c5f3e3e32b (diff) | |
| download | rust-9d1aeaeb827da7a10b7cfaccf0a1d6ebf414a7b5.tar.gz rust-9d1aeaeb827da7a10b7cfaccf0a1d6ebf414a7b5.zip | |
Auto merge of #94214 - nikic:rust-opaque-pointers, r=cuviper
Prepare Rust for opaque pointers Fix one codegen bug with opaque pointers, and update our IR tests to accept both typed pointer and opaque pointer IR. This is a bit annoying, but unavoidable if we want decent test coverage on both LLVM 14 and LLVM 15. This prepares Rust for when LLVM will enable opaque pointers by default.
Diffstat (limited to 'src/test/codegen/function-arguments-noopt.rs')
| -rw-r--r-- | src/test/codegen/function-arguments-noopt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/codegen/function-arguments-noopt.rs b/src/test/codegen/function-arguments-noopt.rs index 94561288dc5..ff76405a4ea 100644 --- a/src/test/codegen/function-arguments-noopt.rs +++ b/src/test/codegen/function-arguments-noopt.rs @@ -23,7 +23,7 @@ pub fn boolean_call(x: bool, f: fn(bool) -> bool) -> bool { f(x) } -// CHECK: align 4 i32* @borrow(i32* align 4 %x) +// CHECK: align 4 {{i32\*|ptr}} @borrow({{i32\*|ptr}} align 4 %x) #[no_mangle] pub fn borrow(x: &i32) -> &i32 { x @@ -32,11 +32,11 @@ pub fn borrow(x: &i32) -> &i32 { // CHECK-LABEL: @borrow_call #[no_mangle] pub fn borrow_call(x: &i32, f: fn(&i32) -> &i32) -> &i32 { - // CHECK: call align 4 i32* %f(i32* align 4 %x) + // CHECK: call align 4 {{i32\*|ptr}} %f({{i32\*|ptr}} align 4 %x) f(x) } -// CHECK: void @struct_(%S* sret(%S){{( %0)?}}, %S* %x) +// CHECK: void @struct_({{%S\*|ptr}} sret(%S){{( %0)?}}, {{%S\*|ptr}} %x) #[no_mangle] pub fn struct_(x: S) -> S { x @@ -45,7 +45,7 @@ pub fn struct_(x: S) -> S { // CHECK-LABEL: @struct_call #[no_mangle] pub fn struct_call(x: S, f: fn(S) -> S) -> S { - // CHECK: call void %f(%S* sret(%S){{( %0)?}}, %S* %{{.+}}) + // CHECK: call void %f({{%S\*|ptr}} sret(%S){{( %0)?}}, {{%S\*|ptr}} %{{.+}}) f(x) } |
