allow main to have any integer type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-02-04 17:48:18 +00:00
parent 4cb16349b0
commit 45f3683547

View File

@ -347,7 +347,7 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
}
// FALLS THROUGH
case 0:
if (FTy->getReturnType() != Type::Int32Ty &&
if (!isa<IntegerType>(FTy->getReturnType()) &&
FTy->getReturnType() != Type::VoidTy) {
cerr << "Invalid return type of main() supplied\n";
abort();