allow main to have any integer type.
authorChris Lattner <sabre@nondot.org>
Wed, 4 Feb 2009 17:48:18 +0000 (17:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Feb 2009 17:48:18 +0000 (17:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63743 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp

index 9fea1f5753f8fd6093b27870724da06b2b038d78..4678d0c1830881ab7c9fb2082968c3eab83990a1 100644 (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();