blob: 944e39d2e594a67bdc0c71a1e522e1cf0054f822 [file] [log] [blame]
Reid Spencera4987472005-04-25 02:50:08 +00001; Test that the ExitInMainOptimization pass works correctly
Reid Spencer69ccadd2006-12-02 04:23:10 +00002; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
Reid Spencera4987472005-04-25 02:50:08 +00003
Reid Spencer5517b2b2005-04-25 03:18:19 +00004declare void %exit(int)
5declare void %exitonly(int)
Reid Spencera4987472005-04-25 02:50:08 +00006
7implementation ; Functions:
8
Reid Spencer5517b2b2005-04-25 03:18:19 +00009int %main () {
10 call void %exitonly ( int 3 )
11 call void %exit ( int 3 )
Reid Spencera4987472005-04-25 02:50:08 +000012 ret int 0
13}