summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-18 02:01:10 +0000
committerDan Gohman <gohman@apple.com>2010-06-18 02:01:10 +0000
commitc61056a42135cb5c8de72537a2b7e09c69133447 (patch)
tree3aa237b98ba82036be1cc08a4cd8081209f3f6f2 /llvm/lib/ExecutionEngine
parent559020df1dfb32bdd0ffd1c6e788c20fce827695 (diff)
downloadbcm5719-llvm-c61056a42135cb5c8de72537a2b7e09c69133447.tar.gz
bcm5719-llvm-c61056a42135cb5c8de72537a2b7e09c69133447.zip
Handle execution entrypoints with non-integer return types.
Fix from Russel Power in PR7284. llvm-svn: 106271
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index 0748b546081..59ebe6e2a88 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud