blob: 388f82c6d03cbcab4868e0ac2809bba6c5e615f1 [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
Chris Lattner11a7fd12003-08-21 21:33:19 +00009implementation
John Criswell59da4882003-08-21 21:18:21 +000010
11declare uint %strlen(sbyte*)
12
John Criswell59da4882003-08-21 21:18:21 +000013int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) {
Chris Lattner639b0522003-11-19 19:42:12 +000014 %tmp.2 = load sbyte** %envp.1
15 %tmp.3 = call uint %strlen( sbyte* %tmp.2 )
Chris Lattner11a7fd12003-08-21 21:33:19 +000016 %T = seteq uint %tmp.3, 0
17 %R = cast bool %T to int
18 ret int %R
John Criswell59da4882003-08-21 21:18:21 +000019}
20