3 # Check that cross-crate inlined items are inlined in all compilation units
4 # that refer to them, and not in any other compilation units.
5 # Note that we have to pass `-C codegen-units=6` because up to two CGUs may be
6 # created for each source module (see `rustc_const_eval::monomorphize::partitioning`).
10 $(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=6 \
12 [ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ .*cci_fn)" -eq "2" ]