summaryrefslogtreecommitdiffstats
path: root/tests/run-make/pgo-branch-weights/main.rs
blob: 619cf9c698c9e577322ec7923bd25aed1ebd0e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate interesting;

fn main() {
    let arg = std::env::args().skip(1).next().unwrap();

    for c in arg.chars() {
        if c == '2' {
            interesting::function_called_twice(c);
        } else {
            interesting::function_called_42_times(c);
        }

        if c == '0' {
            interesting::function_called_never(c);
        }
    }
}