forked from OSchip/llvm-project
A test case for the the ExitInMain libcall simplification.
llvm-svn: 21521
This commit is contained in:
parent
8edc8beacf
commit
985f484263
|
@ -0,0 +1,13 @@
|
|||
; Test that the ExitInMainOptimization pass works correctly
|
||||
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
|
||||
|
||||
declare void "exit"(int)
|
||||
declare void "exitonly"(int)
|
||||
|
||||
implementation ; Functions:
|
||||
|
||||
int "main"() {
|
||||
call void "exitonly" ( int 3 )
|
||||
call void "exit" ( int 3 )
|
||||
ret int 0
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
load_lib llvm-dg.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext
|
Loading…
Reference in New Issue