llvm.org GIT mirror llvm / da06288
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 Chris Lattner 10 years ago
4 changed file(s) with 14 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3333 #include "llvm/ExecutionEngine/JIT.h"
3434 #include "llvm/Support/CommandLine.h"
3535 #include "llvm/Support/ManagedStatic.h"
36 #include "llvm/Target/TargetSelect.h"
3637 #include
3738 #include
3839 using namespace llvm;
134135
135136 //Write it out
136137 if (JIT) {
138 InitializeNativeTarget();
139
137140 std::cout << "------- Running JIT -------\n";
138141 ExistingModuleProvider *mp = new ExistingModuleProvider(mod);
139142 ExecutionEngine *ee = ExecutionEngine::create(mp, false);
4141 #include "llvm/ExecutionEngine/JIT.h"
4242 #include "llvm/ExecutionEngine/Interpreter.h"
4343 #include "llvm/ExecutionEngine/GenericValue.h"
44 #include "llvm/Target/TargetSelect.h"
4445 #include "llvm/Support/ManagedStatic.h"
4546 #include "llvm/Support/raw_ostream.h"
4647 using namespace llvm;
4748
4849 int main() {
50
51 InitializeNativeTarget();
52
4953 // Create some module to put our function into it.
5054 Module *M = new Module("test");
5155
44 #include "llvm/PassManager.h"
55 #include "llvm/Analysis/Verifier.h"
66 #include "llvm/Target/TargetData.h"
7 #include "llvm/Target/TargetSelect.h"
78 #include "llvm/Transforms/Scalar.h"
89 #include "llvm/Support/IRBuilder.h"
910 #include
10801081 //===----------------------------------------------------------------------===//
10811082
10821083 int main() {
1084 InitializeNativeTarget();
1085
10831086 // Install standard binary operators.
10841087 // 1 is lowest precedence.
10851088 BinopPrecedence['='] = 2;
2525 #include "llvm/ExecutionEngine/JIT.h"
2626 #include "llvm/ExecutionEngine/Interpreter.h"
2727 #include "llvm/ExecutionEngine/GenericValue.h"
28 #include "llvm/Target/TargetSelect.h"
2829 #include
2930 using namespace llvm;
3031
228229 return (void*)(intptr_t)gv.IntVal.getZExtValue();
229230 }
230231
231 int main()
232 {
232 int main() {
233 InitializeNativeTarget();
234
233235 // Create some module to put our function into it.
234236 Module *M = new Module("test");
235237