Deleted Added
full compact
lli.cpp (221337) lli.cpp (226584)
1//===- lli.cpp - LLVM Interpreter / Dynamic compiler ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 19 unchanged lines hidden (view full) ---

28#include "llvm/Support/IRReader.h"
29#include "llvm/Support/ManagedStatic.h"
30#include "llvm/Support/MemoryBuffer.h"
31#include "llvm/Support/PluginLoader.h"
32#include "llvm/Support/PrettyStackTrace.h"
33#include "llvm/Support/raw_ostream.h"
34#include "llvm/Support/Process.h"
35#include "llvm/Support/Signals.h"
1//===- lli.cpp - LLVM Interpreter / Dynamic compiler ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 19 unchanged lines hidden (view full) ---

28#include "llvm/Support/IRReader.h"
29#include "llvm/Support/ManagedStatic.h"
30#include "llvm/Support/MemoryBuffer.h"
31#include "llvm/Support/PluginLoader.h"
32#include "llvm/Support/PrettyStackTrace.h"
33#include "llvm/Support/raw_ostream.h"
34#include "llvm/Support/Process.h"
35#include "llvm/Support/Signals.h"
36#include "llvm/Target/TargetSelect.h"
36#include "llvm/Support/TargetSelect.h"
37#include <cerrno>
38
39#ifdef __CYGWIN__
40#include <cygwin/version.h>
41#if defined(CYGWIN_VERSION_DLL_MAJOR) && CYGWIN_VERSION_DLL_MAJOR<1007
42#define DO_NOTHING_ATEXIT 1
43#endif
44#endif

--- 58 unchanged lines hidden (view full) ---

103 cl::opt<bool>
104 DisableCoreFiles("disable-core-files", cl::Hidden,
105 cl::desc("Disable emission of core files if possible"));
106
107 cl::opt<bool>
108 NoLazyCompilation("disable-lazy-compilation",
109 cl::desc("Disable JIT lazy compilation"),
110 cl::init(false));
37#include <cerrno>
38
39#ifdef __CYGWIN__
40#include <cygwin/version.h>
41#if defined(CYGWIN_VERSION_DLL_MAJOR) && CYGWIN_VERSION_DLL_MAJOR<1007
42#define DO_NOTHING_ATEXIT 1
43#endif
44#endif

--- 58 unchanged lines hidden (view full) ---

103 cl::opt<bool>
104 DisableCoreFiles("disable-core-files", cl::Hidden,
105 cl::desc("Disable emission of core files if possible"));
106
107 cl::opt<bool>
108 NoLazyCompilation("disable-lazy-compilation",
109 cl::desc("Disable JIT lazy compilation"),
110 cl::init(false));
111
112 cl::opt<Reloc::Model>
113 RelocModel("relocation-model",
114 cl::desc("Choose relocation model"),
115 cl::init(Reloc::Default),
116 cl::values(
117 clEnumValN(Reloc::Default, "default",
118 "Target default relocation model"),
119 clEnumValN(Reloc::Static, "static",
120 "Non-relocatable code"),
121 clEnumValN(Reloc::PIC_, "pic",
122 "Fully relocatable, position independent code"),
123 clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic",
124 "Relocatable external references, non-relocatable code"),
125 clEnumValEnd));
126
127 cl::opt<llvm::CodeModel::Model>
128 CMModel("code-model",
129 cl::desc("Choose code model"),
130 cl::init(CodeModel::JITDefault),
131 cl::values(clEnumValN(CodeModel::JITDefault, "default",
132 "Target default JIT code model"),
133 clEnumValN(CodeModel::Small, "small",
134 "Small code model"),
135 clEnumValN(CodeModel::Kernel, "kernel",
136 "Kernel code model"),
137 clEnumValN(CodeModel::Medium, "medium",
138 "Medium code model"),
139 clEnumValN(CodeModel::Large, "large",
140 "Large code model"),
141 clEnumValEnd));
142
111}
112
113static ExecutionEngine *EE = 0;
114
115static void do_shutdown() {
116 // Cygwin-1.5 invokes DLL's dtors before atexit handler.
117#ifndef DO_NOTHING_ATEXIT
118 delete EE;

--- 40 unchanged lines hidden (view full) ---

159 exit(1);
160 }
161 }
162
163 EngineBuilder builder(Mod);
164 builder.setMArch(MArch);
165 builder.setMCPU(MCPU);
166 builder.setMAttrs(MAttrs);
143}
144
145static ExecutionEngine *EE = 0;
146
147static void do_shutdown() {
148 // Cygwin-1.5 invokes DLL's dtors before atexit handler.
149#ifndef DO_NOTHING_ATEXIT
150 delete EE;

--- 40 unchanged lines hidden (view full) ---

191 exit(1);
192 }
193 }
194
195 EngineBuilder builder(Mod);
196 builder.setMArch(MArch);
197 builder.setMCPU(MCPU);
198 builder.setMAttrs(MAttrs);
199 builder.setRelocationModel(RelocModel);
200 builder.setCodeModel(CMModel);
167 builder.setErrorStr(&ErrorMsg);
168 builder.setEngineKind(ForceInterpreter
169 ? EngineKind::Interpreter
170 : EngineKind::JIT);
171
172 // If we are supposed to override the target triple, do so now.
173 if (!TargetTriple.empty())
174 Mod->setTargetTriple(Triple::normalize(TargetTriple));

--- 97 unchanged lines hidden ---
201 builder.setErrorStr(&ErrorMsg);
202 builder.setEngineKind(ForceInterpreter
203 ? EngineKind::Interpreter
204 : EngineKind::JIT);
205
206 // If we are supposed to override the target triple, do so now.
207 if (!TargetTriple.empty())
208 Mod->setTargetTriple(Triple::normalize(TargetTriple));

--- 97 unchanged lines hidden ---