]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/pic-relocation-model.rs
6e1d5a6c3f2712f22fca6991cd44ca62ea8f8fce
[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}