mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
make sure that JIT examples link in their appropriate target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b04c94152
commit
da06288aeb
@ -34,6 +34,7 @@
|
||||
#include "llvm/ExecutionEngine/JIT.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
@ -135,6 +136,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
//Write it out
|
||||
if (JIT) {
|
||||
InitializeNativeTarget();
|
||||
|
||||
std::cout << "------- Running JIT -------\n";
|
||||
ExistingModuleProvider *mp = new ExistingModuleProvider(mod);
|
||||
ExecutionEngine *ee = ExecutionEngine::create(mp, false);
|
||||
|
@ -42,11 +42,15 @@
|
||||
#include "llvm/ExecutionEngine/JIT.h"
|
||||
#include "llvm/ExecutionEngine/Interpreter.h"
|
||||
#include "llvm/ExecutionEngine/GenericValue.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
||||
int main() {
|
||||
|
||||
InitializeNativeTarget();
|
||||
|
||||
// Create some module to put our function into it.
|
||||
Module *M = new Module("test");
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Support/IRBuilder.h"
|
||||
#include <cstdio>
|
||||
@ -1081,6 +1082,8 @@ double printd(double X) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
int main() {
|
||||
InitializeNativeTarget();
|
||||
|
||||
// Install standard binary operators.
|
||||
// 1 is lowest precedence.
|
||||
BinopPrecedence['='] = 2;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "llvm/ExecutionEngine/JIT.h"
|
||||
#include "llvm/ExecutionEngine/Interpreter.h"
|
||||
#include "llvm/ExecutionEngine/GenericValue.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
|
||||
@ -229,8 +230,9 @@ void* callFunc( void* param )
|
||||
return (void*)(intptr_t)gv.IntVal.getZExtValue();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
InitializeNativeTarget();
|
||||
|
||||
// Create some module to put our function into it.
|
||||
Module *M = new Module("test");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user