blob: 3fded2cc070e62dab1c9c9d0650e9bcf8ee6c569 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Test that the ExitInMainOptimization pass works correctly
2; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
Dan Gohman552fb262007-08-15 13:49:33 +00003; RUN: grep {ret i32 3} | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; END.
5
6declare void %exit(int)
7declare void %exitonly(int)
8
9implementation ; Functions:
10
11int %main () {
12 call void %exitonly ( int 3 )
13 call void %exit ( int 3 )
14 ret int 0
15}