1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
12 // This test checks that a change in a CGU does not invalidate an unrelated CGU
13 // during incremental ThinLTO.
15 // revisions: cfail1 cfail2 cfail3
16 // compile-flags: -Z query-dep-graph -O
19 #![feature(rustc_attrs)]
22 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo",
25 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo",
29 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
32 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
36 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
39 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
45 pub fn inlined_fn() -> u32 {
50 pub fn inlined_fn() -> u32 {
58 pub fn caller() -> u32 {
64 pub fn unrelated_to_other_fns() -> u64 {