John Criswell | 59da488 | 2003-08-21 21:18:21 +0000 | [diff] [blame^] | 1 | ; |
| 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 | |
| 9 | target endian = little |
| 10 | target pointersize = 32 |
| 11 | %struct..TorRec = type { int, void ()* } |
| 12 | |
| 13 | implementation ; Functions: |
| 14 | |
| 15 | declare uint %strlen(sbyte*) |
| 16 | |
| 17 | declare void %exit(int) |
| 18 | |
| 19 | internal void %__main() { |
| 20 | entry: ; No predecessors! |
| 21 | ret void |
| 22 | } |
| 23 | |
| 24 | int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) { |
| 25 | entry: ; 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 | |
| 34 | declare int %write(int, sbyte*, uint) |