2006-12-03 16:17:19 +00:00
|
|
|
; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
|
2004-11-06 23:32:43 +00:00
|
|
|
; RUN: lli %t.bc > /dev/null
|
|
|
|
|
2003-08-21 21:18:21 +00:00
|
|
|
;
|
|
|
|
; Regression Test: EnvironmentTest.ll
|
|
|
|
;
|
|
|
|
; Description:
|
|
|
|
; This is a regression test that verifies that the JIT passes the
|
|
|
|
; environment to the main() function.
|
|
|
|
;
|
|
|
|
|
2003-08-21 21:33:19 +00:00
|
|
|
implementation
|
2003-08-21 21:18:21 +00:00
|
|
|
|
|
|
|
declare uint %strlen(sbyte*)
|
|
|
|
|
|
|
|
int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) {
|
2003-11-19 19:42:12 +00:00
|
|
|
%tmp.2 = load sbyte** %envp.1
|
|
|
|
%tmp.3 = call uint %strlen( sbyte* %tmp.2 )
|
2003-08-21 21:33:19 +00:00
|
|
|
%T = seteq uint %tmp.3, 0
|
|
|
|
%R = cast bool %T to int
|
|
|
|
ret int %R
|
2003-08-21 21:18:21 +00:00
|
|
|
}
|
|
|
|
|