Skip to content

Commit

Permalink
Adapt run-make/sep-comp-inlining test case to new behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Sep 15, 2016
1 parent c10176e commit 928c398
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/test/run-make/sepcomp-inlining/Makefile
@@ -1,13 +1,14 @@
-include ../tools.mk

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

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

0 comments on commit 928c398

Please sign in to comment.