File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,13 @@ static Error compileAndExecuteVoidFunction(
222222 CompileAndExecuteConfig config, std::unique_ptr<llvm::TargetMachine> tm) {
223223 auto mainFunction = dyn_cast_or_null<LLVM::LLVMFuncOp>(
224224 SymbolTable::lookupSymbolIn (module , entryPoint));
225- if (!mainFunction || mainFunction.empty ())
225+ if (!mainFunction || mainFunction.isExternal ())
226226 return makeStringError (" entry point not found" );
227227
228+ if (cast<LLVM::LLVMFunctionType>(mainFunction.getFunctionType ())
229+ .getNumParams () != 0 )
230+ return makeStringError (" function inputs not supported" );
231+
228232 auto resultType = dyn_cast<LLVM::LLVMVoidType>(
229233 mainFunction.getFunctionType ().getReturnType ());
230234 if (!resultType)
You can’t perform that action at this time.
0 commit comments