mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Make Kaleidoscope not link against the interpreter, since that didn't
work anyway (Interpreter::getPointerToFunction doesn't return a callable pointer), and improve the error message when an ExecutionEngine can't be created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95896 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,6 +11,6 @@ TOOLNAME = Kaleidoscope-Ch7
|
||||
EXAMPLE_TOOL = 1
|
||||
REQUIRES_RTTI := 1
|
||||
|
||||
LINK_COMPONENTS := core jit interpreter native
|
||||
LINK_COMPONENTS := core jit native
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/ExecutionEngine/ExecutionEngine.h"
|
||||
#include "llvm/ExecutionEngine/Interpreter.h"
|
||||
#include "llvm/ExecutionEngine/JIT.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Module.h"
|
||||
@@ -1100,7 +1099,12 @@ int main() {
|
||||
TheModule = new Module("my cool jit", Context);
|
||||
|
||||
// Create the JIT. This takes ownership of the module.
|
||||
TheExecutionEngine = EngineBuilder(TheModule).create();
|
||||
std::string ErrStr;
|
||||
TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create();
|
||||
if (!TheExecutionEngine) {
|
||||
fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
FunctionPassManager OurFPM(TheModule);
|
||||
|
||||
|
Reference in New Issue
Block a user