Skip to content

Commit 928c398

Browse files
Adapt run-make/sep-comp-inlining test case to new behaviour
1 parent c10176e commit 928c398

File tree

1 file changed

+7
-6
lines changed
  • src/test/run-make/sepcomp-inlining

1 file changed

+7
-6
lines changed
+7-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
-include ../tools.mk
22

3-
# Test that #[inline(always)] functions still get inlined across compilation
4-
# unit boundaries. Compilation should produce three IR files, with each one
5-
# containing a definition of the inlined function. Also, the non-#[inline]
6-
# function should be defined in only one compilation unit.
3+
# Test that #[inline] functions still get inlined across compilation unit
4+
# boundaries. Compilation should produce three IR files, but only the two
5+
# compilation units that have a usage of the #[inline] function should
6+
# contain a definition. Also, the non-#[inline] function should be defined
7+
# in only one compilation unit.
78

89
all:
910
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3
10-
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c define\ i32\ .*inlined)" -eq "1" ]
11-
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c define\ available_externally\ i32\ .*inlined)" -eq "2" ]
11+
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c define\ i32\ .*inlined)" -eq "0" ]
12+
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "2" ]
1213
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c define\ i32\ .*normal)" -eq "1" ]
1314
[ "$$(cat "$(TMPDIR)"/foo.?.ll | grep -c declare\ i32\ .*normal)" -eq "2" ]

0 commit comments

Comments
 (0)