aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyLibCalls/ExitInMain.ll
blob: 8abf3b1cc46ba9dc287604f2c3a210603463ef8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; Test that the ExitInMainOptimization pass works correctly
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
; RUN:    grep {ret i32 3} | count 1
; END.

declare void @exit(i32)

declare void @exitonly(i32)

define i32 @main() {
	call void @exitonly( i32 3 )
	call void @exit( i32 3 )
	ret i32 0
}