mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Make main do some simple work without requiring main arguments to be happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
634b352fa6
commit
1b3512ff97
10
test/fib.ll
10
test/fib.ll
@ -19,7 +19,7 @@ RecurseCase:
|
||||
ret ulong %result
|
||||
end
|
||||
|
||||
ulong "main"(int %argc, sbyte ** %argv)
|
||||
ulong "realmain"(int %argc, sbyte ** %argv)
|
||||
begin
|
||||
seteq int %argc, 2 ; {bool}:0
|
||||
br bool %0, label %HasArg, label %Continue
|
||||
@ -34,3 +34,11 @@ Continue:
|
||||
%F = call ulong(ulong) *%fib(ulong %N)
|
||||
ret ulong %F
|
||||
end
|
||||
|
||||
int "main"()
|
||||
begin
|
||||
%Result = call ulong %fib(ulong 10)
|
||||
%Result = cast ulong %Result to int
|
||||
ret int %Result
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user