Skip to content

Commit 7efeeba

Browse files
committed
Use start for the sepcomp-inlining test
1 parent 072f3eb commit 7efeeba

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/test/run-make/sepcomp-inlining/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ all:
1010
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3 \
1111
-Z inline-in-all-cgus
1212
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ i32\ .*inlined)" -eq "0" ]
13-
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "1" ]
13+
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "2" ]
1414
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ hidden\ i32\ .*normal)" -eq "1" ]
15-
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "1" ]
15+
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "2" ]

src/test/run-make/sepcomp-inlining/foo.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(start)]
12+
1113
#[inline]
1214
fn inlined() -> u32 {
1315
1234
@@ -29,7 +31,10 @@ mod b {
2931
}
3032
}
3133

32-
fn main() {
34+
#[start]
35+
fn start(_: isize, _: *const *const u8) -> isize {
3336
a::f();
3437
b::f();
38+
39+
0
3540
}

0 commit comments

Comments
 (0)