]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/pic-relocation-model.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 7, !"PIC Level", i32 2}