Skip to content

Commit

Permalink
Use start for the sepcomp-inlining test
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Dec 26, 2017
1 parent 072f3eb commit 7efeeba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/test/run-make/sepcomp-inlining/Makefile
Expand Up @@ -10,6 +10,6 @@ all:
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3 \
-Z inline-in-all-cgus
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ i32\ .*inlined)" -eq "0" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "2" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ hidden\ i32\ .*normal)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "2" ]
7 changes: 6 additions & 1 deletion src/test/run-make/sepcomp-inlining/foo.rs
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(start)]

#[inline]
fn inlined() -> u32 {
1234
Expand All @@ -29,7 +31,10 @@ mod b {
}
}

fn main() {
#[start]
fn start(_: isize, _: *const *const u8) -> isize {
a::f();
b::f();

0
}

0 comments on commit 7efeeba

Please sign in to comment.