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:
Chris Lattner 2001-10-15 19:18:01 +00:00
parent 634b352fa6
commit 1b3512ff97

View File

@ -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