diff options
| author | Bastian Köcher <git@kchr.de> | 2017-12-22 21:06:18 +0100 |
|---|---|---|
| committer | Bastian Köcher <git@kchr.de> | 2017-12-26 12:26:39 +0100 |
| commit | 7efeeba13a2ca862f8d0f6e1f0f6fd936478b78f (patch) | |
| tree | 955704faccc551b7ab3fdcec079f567dfeabcf09 | |
| parent | 072f3ebd878ad044abedd3324469ae1b01eca67b (diff) | |
| download | rust-7efeeba13a2ca862f8d0f6e1f0f6fd936478b78f.tar.gz rust-7efeeba13a2ca862f8d0f6e1f0f6fd936478b78f.zip | |
Use `start` for the `sepcomp-inlining` test
| -rw-r--r-- | src/test/run-make/sepcomp-inlining/Makefile | 4 | ||||
| -rw-r--r-- | src/test/run-make/sepcomp-inlining/foo.rs | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/test/run-make/sepcomp-inlining/Makefile b/src/test/run-make/sepcomp-inlining/Makefile index db4edb71fb7..1d20d940000 100644 --- a/src/test/run-make/sepcomp-inlining/Makefile +++ b/src/test/run-make/sepcomp-inlining/Makefile @@ -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" ] diff --git a/src/test/run-make/sepcomp-inlining/foo.rs b/src/test/run-make/sepcomp-inlining/foo.rs index 20fd18b8295..5b62c1b0626 100644 --- a/src/test/run-make/sepcomp-inlining/foo.rs +++ b/src/test/run-make/sepcomp-inlining/foo.rs @@ -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 @@ -29,7 +31,10 @@ mod b { } } -fn main() { +#[start] +fn start(_: isize, _: *const *const u8) -> isize { a::f(); b::f(); + + 0 } |
