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:
Dan Gohman 2010-06-18 02:01:10 +00:00
parent c185a12f25
commit 963433115a

View File

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