mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.
Now you can build a tool with just the JIT or just the interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -17,11 +17,24 @@
|
||||
#include "llvm/CodeGen/IntrinsicLowering.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/ModuleProvider.h"
|
||||
using namespace llvm;
|
||||
|
||||
static struct RegisterInterp {
|
||||
RegisterInterp() { Interpreter::Register(); }
|
||||
} InterpRegistrator;
|
||||
|
||||
/// create - Create a new interpreter object. This can never fail.
|
||||
///
|
||||
ExecutionEngine *Interpreter::create(Module *M, IntrinsicLowering *IL) {
|
||||
ExecutionEngine *Interpreter::create(ModuleProvider *MP,
|
||||
IntrinsicLowering *IL) {
|
||||
Module *M;
|
||||
try {
|
||||
M = MP->materializeModule();
|
||||
} catch (...) {
|
||||
return 0; // error materializing the module.
|
||||
}
|
||||
|
||||
bool isLittleEndian = false;
|
||||
switch (M->getEndianness()) {
|
||||
case Module::LittleEndian: isLittleEndian = true; break;
|
||||
|
Reference in New Issue
Block a user