blob: 82d4d460b957201844c393810f2395bd59e0af50 [file] [log] [blame]
John Criswell59da4882003-08-21 21:18:21 +00001;
2; Regression Test: EnvironmentTest.ll
3;
4; Description:
5; This is a regression test that verifies that the JIT passes the
6; environment to the main() function.
7;
8
9target endian = little
10target pointersize = 32
John Criswell59da4882003-08-21 21:18:21 +000011
Chris Lattner11a7fd12003-08-21 21:33:19 +000012implementation
John Criswell59da4882003-08-21 21:18:21 +000013
14declare uint %strlen(sbyte*)
15
John Criswell59da4882003-08-21 21:18:21 +000016int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) {
John Criswell59da4882003-08-21 21:18:21 +000017 %tmp.2 = load sbyte** %envp.1 ; <sbyte*> [#uses=2]
18 %tmp.3 = call uint %strlen( sbyte* %tmp.2 ) ; <uint> [#uses=1]
Chris Lattner11a7fd12003-08-21 21:33:19 +000019 %T = seteq uint %tmp.3, 0
20 %R = cast bool %T to int
21 ret int %R
John Criswell59da4882003-08-21 21:18:21 +000022}
23