]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/pic-relocation-model.rs
Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errors
[rust.git] / src / test / codegen / pic-relocation-model.rs
1 // compile-flags: -C relocation-model=pic
2
3 #![crate_type = "rlib"]
4
5 // CHECK: define i8 @call_foreign_fn()
6 #[no_mangle]
7 pub fn call_foreign_fn() -> u8 {
8     unsafe {
9         foreign_fn()
10     }
11 }
12
13 // CHECK: declare zeroext i8 @foreign_fn()
14 extern "C" {fn foreign_fn() -> u8;}
15
16 // CHECK: !{i32 {{[78]}}, !"PIC Level", i32 2}