]> git.lizzy.rs Git - rust.git/blob - tests/codegen/call-metadata.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / call-metadata.rs
1 // Checks that range metadata gets emitted on calls to functions returning a
2 // scalar value.
3
4 // compile-flags: -O -C no-prepopulate-passes
5
6 #![crate_type = "lib"]
7
8 pub fn test() {
9     // CHECK: call noundef i8 @some_true(), !range [[R0:![0-9]+]]
10     // CHECK: [[R0]] = !{i8 0, i8 3}
11     some_true();
12 }
13
14 #[no_mangle]
15 fn some_true() -> Option<bool> {
16     Some(true)
17 }