diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-18 02:01:10 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-18 02:01:10 +0000 |
commit | 963433115a540a4521af8afb9880261dd7742807 (patch) | |
tree | e9e5a865ed25b0e3a577032da4cd205b6e32d3f3 | |
parent | c185a12f25dd4129459e899db612444aead247ec (diff) | |
download | external_llvm-963433115a540a4521af8afb9880261dd7742807.zip external_llvm-963433115a540a4521af8afb9880261dd7742807.tar.gz external_llvm-963433115a540a4521af8afb9880261dd7742807.tar.bz2 |
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
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 0748b54..59ebe6e 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -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)); |