From 7efd07fd9dab3596de45f32b5423a575b23fb20f Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 17 Nov 2009 07:52:09 +0000 Subject: Fail less mysteriously; inform the user that their LLVM was not built with libffi support and that the interpreter can't call external functions without it. Patch by Timo Juhani Lindfors! Fixes PR5466. llvm-svn: 89062 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp') diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index a620de59cfd..8b4e9613ad7 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -284,6 +284,9 @@ GenericValue Interpreter::callExternalFunction(Function *F, else llvm_report_error("Tried to execute an unknown external function: " + F->getType()->getDescription() + " " +F->getName()); +#ifndef USE_LIBFFI + errs() << "Recompiling LLVM with --enable-libffi might help.\n"; +#endif return GenericValue(); } -- cgit v1.2.3