]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/pic-relocation-model.rs
Auto merge of #100678 - GuillaumeGomez:improve-rustdoc-json-tests, r=aDotInTheVoid
[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}