Reid Spencer | a498747 | 2005-04-25 02:50:08 +0000 | [diff] [blame] | 1 | ; Test that the ExitInMainOptimization pass works correctly |
2 | ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1 | ||||
3 | |||||
4 | declare void "exit"(int) | ||||
5 | declare void "exitonly"(int) | ||||
6 | |||||
7 | implementation ; Functions: | ||||
8 | |||||
9 | int "main"() { | ||||
10 | call void "exitonly" ( int 3 ) | ||||
11 | call void "exit" ( int 3 ) | ||||
12 | ret int 0 | ||||
13 | } |