diff options
author | John Criswell <criswell@uiuc.edu> | 2003-08-21 21:18:21 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2003-08-21 21:18:21 +0000 |
commit | 59da4882667199eac0c2ca9d57e4a0c6f320302d (patch) | |
tree | 9b7f5d40c8c0159c943c0cd2fa3551cad5814dfc /test/ExecutionEngine/2003-08-21-EnvironmentTest.ll | |
parent | 69582b35b6aa4e48cbbad7f6f1193c967da96b25 (diff) | |
download | llvm-59da4882667199eac0c2ca9d57e4a0c6f320302d.tar.gz llvm-59da4882667199eac0c2ca9d57e4a0c6f320302d.tar.bz2 llvm-59da4882667199eac0c2ca9d57e4a0c6f320302d.tar.xz |
Regression test that verifies that the JIT passes the environment to the
main() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/2003-08-21-EnvironmentTest.ll')
-rw-r--r-- | test/ExecutionEngine/2003-08-21-EnvironmentTest.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll new file mode 100644 index 0000000000..c880221a0b --- /dev/null +++ b/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll @@ -0,0 +1,34 @@ +; +; Regression Test: EnvironmentTest.ll +; +; Description: +; This is a regression test that verifies that the JIT passes the +; environment to the main() function. +; + +target endian = little +target pointersize = 32 + %struct..TorRec = type { int, void ()* } + +implementation ; Functions: + +declare uint %strlen(sbyte*) + +declare void %exit(int) + +internal void %__main() { +entry: ; No predecessors! + ret void +} + +int %main(int %argc.1, sbyte** %argv.1, sbyte** %envp.1) { +entry: ; No predecessors! + call void %__main( ) + %tmp.2 = load sbyte** %envp.1 ; <sbyte*> [#uses=2] + %tmp.3 = call uint %strlen( sbyte* %tmp.2 ) ; <uint> [#uses=1] + %tmp.0 = call int %write( int 1, sbyte* %tmp.2, uint %tmp.3 ) ; <int> [#uses=0] + call void %exit( int 0 ) + ret int 0 +} + +declare int %write(int, sbyte*, uint) |