mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
In C++, code is not allowed to call main. In C it is, this
simplifylibcalls optimization is thus valid for C++ but not C. It's not important enough to worry about for C++ apps, so just remove it. rdar://7191924 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
; 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
|
||||
}
|
||||
|
Reference in New Issue
Block a user