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 | |
Chris Lattner | 11a7fd1 | 2003-08-21 21:33:19 +0000 | [diff] [blame] | 9 | implementation |
John Criswell | 59da488 | 2003-08-21 21:18:21 +0000 | [diff] [blame] | 10 | |
| 11 | declare uint %strlen(sbyte*) |
| 12 | |
John Criswell | 59da488 | 2003-08-21 21:18:21 +0000 | [diff] [blame] | 13 | int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) { |
Chris Lattner | 639b052 | 2003-11-19 19:42:12 +0000 | [diff] [blame] | 14 | %tmp.2 = load sbyte** %envp.1 |
| 15 | %tmp.3 = call uint %strlen( sbyte* %tmp.2 ) |
Chris Lattner | 11a7fd1 | 2003-08-21 21:33:19 +0000 | [diff] [blame] | 16 | %T = seteq uint %tmp.3, 0 |
| 17 | %R = cast bool %T to int |
| 18 | ret int %R |
John Criswell | 59da488 | 2003-08-21 21:18:21 +0000 | [diff] [blame] | 19 | } |
| 20 | |