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 | 30969a9a4b5f67d6eeb07bf9b00fca1909694410 (patch) | |
tree | e9e5a865ed25b0e3a577032da4cd205b6e32d3f3 /lib/ExecutionEngine/Interpreter | |
parent | 5e61013e5e6a72e1de99ce2019c2ff163d1f3aa7 (diff) | |
download | external_llvm-30969a9a4b5f67d6eeb07bf9b00fca1909694410.zip external_llvm-30969a9a4b5f67d6eeb07bf9b00fca1909694410.tar.gz external_llvm-30969a9a4b5f67d6eeb07bf9b00fca1909694410.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
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-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)); |