mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Handle execution entrypoints with non-integer return types.
Fix from Russel Power in PR7284. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c185a12f25
commit
963433115a
@ -591,7 +591,7 @@ void Interpreter::popStackAndReturnValueToCaller(const Type *RetTy,
|
||||
ECStack.pop_back();
|
||||
|
||||
if (ECStack.empty()) { // Finished main. Put result into exit code...
|
||||
if (RetTy && RetTy->isIntegerTy()) { // Nonvoid return type?
|
||||
if (RetTy && !RetTy->isVoidTy()) { // Nonvoid return type?
|
||||
ExitValue = Result; // Capture the exit value of the program
|
||||
} else {
|
||||
memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
|
||||
|
Loading…
Reference in New Issue
Block a user