blob: c880221a0be46affbd20987ab9e82cea21ba30ee [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
11 %struct..TorRec = type { int, void ()* }
12
13implementation ; Functions:
14
15declare uint %strlen(sbyte*)
16
17declare void %exit(int)
18
19internal void %__main() {
20entry: ; No predecessors!
21 ret void
22}
23
24int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) {
25entry: ; No predecessors!
26 call void %__main( )
27 %tmp.2 = load sbyte** %envp.1 ; <sbyte*> [#uses=2]
28 %tmp.3 = call uint %strlen( sbyte* %tmp.2 ) ; <uint> [#uses=1]
29 %tmp.0 = call int %write( int 1, sbyte* %tmp.2, uint %tmp.3 ) ; <int> [#uses=0]
30 call void %exit( int 0 )
31 ret int 0
32}
33
34declare int %write(int, sbyte*, uint)