rust/src/test/codegen/merge-functions.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
290 B
Rust
Raw Normal View History

2021-12-09 13:04:15 +00:00
// compile-flags: -O
#![crate_type = "lib"]
// CHECK: @func2 = {{.*}}alias{{.*}}@func1
#[no_mangle]
pub fn func1(c: char) -> bool {
c == 's' || c == 'm' || c == 'h' || c == 'd' || c == 'w'
}
#[no_mangle]
pub fn func2(c: char) -> bool {
matches!(c, 's' | 'm' | 'h' | 'd' | 'w')
}