Handle execution entrypoints with non-integer return types.
[oota-llvm.git] / lib / ExecutionEngine / Interpreter / Execution.cpp
index 0748b546081ba09ccdf4ab042be61efe393e2065..59ebe6e2a8850eec351f92cfd58c2597d83ea3a9 100644 (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));