ExecutionEngine interface to re-map addresses for engines that support it.
[oota-llvm.git] / include / llvm / ExecutionEngine / ExecutionEngine.h
1 //===- ExecutionEngine.h - Abstract Execution Engine Interface --*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the abstract interface that implements execution support
11 // for LLVM.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_EXECUTION_ENGINE_H
16 #define LLVM_EXECUTION_ENGINE_H
17
18 #include <vector>
19 #include <map>
20 #include <string>
21 #include "llvm/MC/MCCodeGenInfo.h"
22 #include "llvm/ADT/SmallVector.h"
23 #include "llvm/ADT/StringRef.h"
24 #include "llvm/ADT/ValueMap.h"
25 #include "llvm/ADT/DenseMap.h"
26 #include "llvm/Support/ValueHandle.h"
27 #include "llvm/Support/Mutex.h"
28 #include "llvm/Target/TargetMachine.h"
29 #include "llvm/Target/TargetOptions.h"
30
31 namespace llvm {
32
33 struct GenericValue;
34 class Constant;
35 class ExecutionEngine;
36 class Function;
37 class GlobalVariable;
38 class GlobalValue;
39 class JITEventListener;
40 class JITMemoryManager;
41 class MachineCodeInfo;
42 class Module;
43 class MutexGuard;
44 class TargetData;
45 class Triple;
46 class Type;
47
48 /// \brief Helper class for helping synchronize access to the global address map
49 /// table.
50 class ExecutionEngineState {
51 public:
52   struct AddressMapConfig : public ValueMapConfig<const GlobalValue*> {
53     typedef ExecutionEngineState *ExtraData;
54     static sys::Mutex *getMutex(ExecutionEngineState *EES);
55     static void onDelete(ExecutionEngineState *EES, const GlobalValue *Old);
56     static void onRAUW(ExecutionEngineState *, const GlobalValue *,
57                        const GlobalValue *);
58   };
59
60   typedef ValueMap<const GlobalValue *, void *, AddressMapConfig>
61       GlobalAddressMapTy;
62
63 private:
64   ExecutionEngine &EE;
65
66   /// GlobalAddressMap - A mapping between LLVM global values and their
67   /// actualized version...
68   GlobalAddressMapTy GlobalAddressMap;
69
70   /// GlobalAddressReverseMap - This is the reverse mapping of GlobalAddressMap,
71   /// used to convert raw addresses into the LLVM global value that is emitted
72   /// at the address.  This map is not computed unless getGlobalValueAtAddress
73   /// is called at some point.
74   std::map<void *, AssertingVH<const GlobalValue> > GlobalAddressReverseMap;
75
76 public:
77   ExecutionEngineState(ExecutionEngine &EE);
78
79   GlobalAddressMapTy &getGlobalAddressMap(const MutexGuard &) {
80     return GlobalAddressMap;
81   }
82
83   std::map<void*, AssertingVH<const GlobalValue> > &
84   getGlobalAddressReverseMap(const MutexGuard &) {
85     return GlobalAddressReverseMap;
86   }
87
88   /// \brief Erase an entry from the mapping table.
89   ///
90   /// \returns The address that \arg ToUnmap was happed to.
91   void *RemoveMapping(const MutexGuard &, const GlobalValue *ToUnmap);
92 };
93
94 /// \brief Abstract interface for implementation execution of LLVM modules,
95 /// designed to support both interpreter and just-in-time (JIT) compiler
96 /// implementations.
97 class ExecutionEngine {
98   /// The state object holding the global address mapping, which must be
99   /// accessed synchronously.
100   //
101   // FIXME: There is no particular need the entire map needs to be
102   // synchronized.  Wouldn't a reader-writer design be better here?
103   ExecutionEngineState EEState;
104
105   /// The target data for the platform for which execution is being performed.
106   const TargetData *TD;
107
108   /// Whether lazy JIT compilation is enabled.
109   bool CompilingLazily;
110
111   /// Whether JIT compilation of external global variables is allowed.
112   bool GVCompilationDisabled;
113
114   /// Whether the JIT should perform lookups of external symbols (e.g.,
115   /// using dlsym).
116   bool SymbolSearchingDisabled;
117
118   friend class EngineBuilder;  // To allow access to JITCtor and InterpCtor.
119
120 protected:
121   /// The list of Modules that we are JIT'ing from.  We use a SmallVector to
122   /// optimize for the case where there is only one module.
123   SmallVector<Module*, 1> Modules;
124
125   void setTargetData(const TargetData *td) { TD = td; }
126
127   /// getMemoryforGV - Allocate memory for a global variable.
128   virtual char *getMemoryForGV(const GlobalVariable *GV);
129
130   // To avoid having libexecutionengine depend on the JIT and interpreter
131   // libraries, the execution engine implementations set these functions to ctor
132   // pointers at startup time if they are linked in.
133   static ExecutionEngine *(*JITCtor)(
134     Module *M,
135     std::string *ErrorStr,
136     JITMemoryManager *JMM,
137     bool GVsWithCode,
138     TargetMachine *TM);
139   static ExecutionEngine *(*MCJITCtor)(
140     Module *M,
141     std::string *ErrorStr,
142     JITMemoryManager *JMM,
143     bool GVsWithCode,
144     TargetMachine *TM);
145   static ExecutionEngine *(*InterpCtor)(Module *M, std::string *ErrorStr);
146
147   /// LazyFunctionCreator - If an unknown function is needed, this function
148   /// pointer is invoked to create it.  If this returns null, the JIT will
149   /// abort.
150   void *(*LazyFunctionCreator)(const std::string &);
151
152   /// ExceptionTableRegister - If Exception Handling is set, the JIT will
153   /// register dwarf tables with this function.
154   typedef void (*EERegisterFn)(void*);
155   EERegisterFn ExceptionTableRegister;
156   EERegisterFn ExceptionTableDeregister;
157   /// This maps functions to their exception tables frames.
158   DenseMap<const Function*, void*> AllExceptionTables;
159
160
161 public:
162   /// lock - This lock protects the ExecutionEngine, JIT, JITResolver and
163   /// JITEmitter classes.  It must be held while changing the internal state of
164   /// any of those classes.
165   sys::Mutex lock;
166
167   //===--------------------------------------------------------------------===//
168   //  ExecutionEngine Startup
169   //===--------------------------------------------------------------------===//
170
171   virtual ~ExecutionEngine();
172
173   /// create - This is the factory method for creating an execution engine which
174   /// is appropriate for the current machine.  This takes ownership of the
175   /// module.
176   ///
177   /// \param GVsWithCode - Allocating globals with code breaks
178   /// freeMachineCodeForFunction and is probably unsafe and bad for performance.
179   /// However, we have clients who depend on this behavior, so we must support
180   /// it.  Eventually, when we're willing to break some backwards compatibility,
181   /// this flag should be flipped to false, so that by default
182   /// freeMachineCodeForFunction works.
183   static ExecutionEngine *create(Module *M,
184                                  bool ForceInterpreter = false,
185                                  std::string *ErrorStr = 0,
186                                  CodeGenOpt::Level OptLevel =
187                                  CodeGenOpt::Default,
188                                  bool GVsWithCode = true);
189
190   /// createJIT - This is the factory method for creating a JIT for the current
191   /// machine, it does not fall back to the interpreter.  This takes ownership
192   /// of the Module and JITMemoryManager if successful.
193   ///
194   /// Clients should make sure to initialize targets prior to calling this
195   /// function.
196   static ExecutionEngine *createJIT(Module *M,
197                                     std::string *ErrorStr = 0,
198                                     JITMemoryManager *JMM = 0,
199                                     CodeGenOpt::Level OptLevel =
200                                     CodeGenOpt::Default,
201                                     bool GVsWithCode = true,
202                                     Reloc::Model RM = Reloc::Default,
203                                     CodeModel::Model CMM =
204                                     CodeModel::JITDefault);
205
206   /// addModule - Add a Module to the list of modules that we can JIT from.
207   /// Note that this takes ownership of the Module: when the ExecutionEngine is
208   /// destroyed, it destroys the Module as well.
209   virtual void addModule(Module *M) {
210     Modules.push_back(M);
211   }
212
213   //===--------------------------------------------------------------------===//
214
215   const TargetData *getTargetData() const { return TD; }
216
217   /// removeModule - Remove a Module from the list of modules.  Returns true if
218   /// M is found.
219   virtual bool removeModule(Module *M);
220
221   /// FindFunctionNamed - Search all of the active modules to find the one that
222   /// defines FnName.  This is very slow operation and shouldn't be used for
223   /// general code.
224   Function *FindFunctionNamed(const char *FnName);
225
226   /// runFunction - Execute the specified function with the specified arguments,
227   /// and return the result.
228   virtual GenericValue runFunction(Function *F,
229                                 const std::vector<GenericValue> &ArgValues) = 0;
230
231   /// getPointerToNamedFunction - This method returns the address of the
232   /// specified function by using the dlsym function call.  As such it is only
233   /// useful for resolving library symbols, not code generated symbols.
234   ///
235   /// If AbortOnFailure is false and no function with the given name is
236   /// found, this function silently returns a null pointer. Otherwise,
237   /// it prints a message to stderr and aborts.
238   ///
239   virtual void *getPointerToNamedFunction(const std::string &Name,
240                                           bool AbortOnFailure = true) = 0;
241
242   /// mapSectionAddress - map a section to its target address space value.
243   /// Map the address of a JIT section as returned from the memory manager
244   /// to the address in the target process as the running code will see it.
245   /// This is the address which will be used for relocation resolution.
246   virtual void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress) {
247     assert(0 && "Re-mapping of section addresses not supported with this EE!");
248   }
249
250   /// runStaticConstructorsDestructors - This method is used to execute all of
251   /// the static constructors or destructors for a program.
252   ///
253   /// \param isDtors - Run the destructors instead of constructors.
254   void runStaticConstructorsDestructors(bool isDtors);
255
256   /// runStaticConstructorsDestructors - This method is used to execute all of
257   /// the static constructors or destructors for a particular module.
258   ///
259   /// \param isDtors - Run the destructors instead of constructors.
260   void runStaticConstructorsDestructors(Module *module, bool isDtors);
261
262
263   /// runFunctionAsMain - This is a helper function which wraps runFunction to
264   /// handle the common task of starting up main with the specified argc, argv,
265   /// and envp parameters.
266   int runFunctionAsMain(Function *Fn, const std::vector<std::string> &argv,
267                         const char * const * envp);
268
269
270   /// addGlobalMapping - Tell the execution engine that the specified global is
271   /// at the specified location.  This is used internally as functions are JIT'd
272   /// and as global variables are laid out in memory.  It can and should also be
273   /// used by clients of the EE that want to have an LLVM global overlay
274   /// existing data in memory.  Mappings are automatically removed when their
275   /// GlobalValue is destroyed.
276   void addGlobalMapping(const GlobalValue *GV, void *Addr);
277
278   /// clearAllGlobalMappings - Clear all global mappings and start over again,
279   /// for use in dynamic compilation scenarios to move globals.
280   void clearAllGlobalMappings();
281
282   /// clearGlobalMappingsFromModule - Clear all global mappings that came from a
283   /// particular module, because it has been removed from the JIT.
284   void clearGlobalMappingsFromModule(Module *M);
285
286   /// updateGlobalMapping - Replace an existing mapping for GV with a new
287   /// address.  This updates both maps as required.  If "Addr" is null, the
288   /// entry for the global is removed from the mappings.  This returns the old
289   /// value of the pointer, or null if it was not in the map.
290   void *updateGlobalMapping(const GlobalValue *GV, void *Addr);
291
292   /// getPointerToGlobalIfAvailable - This returns the address of the specified
293   /// global value if it is has already been codegen'd, otherwise it returns
294   /// null.
295   void *getPointerToGlobalIfAvailable(const GlobalValue *GV);
296
297   /// getPointerToGlobal - This returns the address of the specified global
298   /// value. This may involve code generation if it's a function.
299   void *getPointerToGlobal(const GlobalValue *GV);
300
301   /// getPointerToFunction - The different EE's represent function bodies in
302   /// different ways.  They should each implement this to say what a function
303   /// pointer should look like.  When F is destroyed, the ExecutionEngine will
304   /// remove its global mapping and free any machine code.  Be sure no threads
305   /// are running inside F when that happens.
306   virtual void *getPointerToFunction(Function *F) = 0;
307
308   /// getPointerToBasicBlock - The different EE's represent basic blocks in
309   /// different ways.  Return the representation for a blockaddress of the
310   /// specified block.
311   virtual void *getPointerToBasicBlock(BasicBlock *BB) = 0;
312
313   /// getPointerToFunctionOrStub - If the specified function has been
314   /// code-gen'd, return a pointer to the function.  If not, compile it, or use
315   /// a stub to implement lazy compilation if available.  See
316   /// getPointerToFunction for the requirements on destroying F.
317   virtual void *getPointerToFunctionOrStub(Function *F) {
318     // Default implementation, just codegen the function.
319     return getPointerToFunction(F);
320   }
321
322   // The JIT overrides a version that actually does this.
323   virtual void runJITOnFunction(Function *, MachineCodeInfo * = 0) { }
324
325   /// getGlobalValueAtAddress - Return the LLVM global value object that starts
326   /// at the specified address.
327   ///
328   const GlobalValue *getGlobalValueAtAddress(void *Addr);
329
330   /// StoreValueToMemory - Stores the data in Val of type Ty at address Ptr.
331   /// Ptr is the address of the memory at which to store Val, cast to
332   /// GenericValue *.  It is not a pointer to a GenericValue containing the
333   /// address at which to store Val.
334   void StoreValueToMemory(const GenericValue &Val, GenericValue *Ptr,
335                           Type *Ty);
336
337   void InitializeMemory(const Constant *Init, void *Addr);
338
339   /// recompileAndRelinkFunction - This method is used to force a function which
340   /// has already been compiled to be compiled again, possibly after it has been
341   /// modified.  Then the entry to the old copy is overwritten with a branch to
342   /// the new copy.  If there was no old copy, this acts just like
343   /// VM::getPointerToFunction().
344   virtual void *recompileAndRelinkFunction(Function *F) = 0;
345
346   /// freeMachineCodeForFunction - Release memory in the ExecutionEngine
347   /// corresponding to the machine code emitted to execute this function, useful
348   /// for garbage-collecting generated code.
349   virtual void freeMachineCodeForFunction(Function *F) = 0;
350
351   /// getOrEmitGlobalVariable - Return the address of the specified global
352   /// variable, possibly emitting it to memory if needed.  This is used by the
353   /// Emitter.
354   virtual void *getOrEmitGlobalVariable(const GlobalVariable *GV) {
355     return getPointerToGlobal((GlobalValue*)GV);
356   }
357
358   /// Registers a listener to be called back on various events within
359   /// the JIT.  See JITEventListener.h for more details.  Does not
360   /// take ownership of the argument.  The argument may be NULL, in
361   /// which case these functions do nothing.
362   virtual void RegisterJITEventListener(JITEventListener *) {}
363   virtual void UnregisterJITEventListener(JITEventListener *) {}
364
365   /// DisableLazyCompilation - When lazy compilation is off (the default), the
366   /// JIT will eagerly compile every function reachable from the argument to
367   /// getPointerToFunction.  If lazy compilation is turned on, the JIT will only
368   /// compile the one function and emit stubs to compile the rest when they're
369   /// first called.  If lazy compilation is turned off again while some lazy
370   /// stubs are still around, and one of those stubs is called, the program will
371   /// abort.
372   ///
373   /// In order to safely compile lazily in a threaded program, the user must
374   /// ensure that 1) only one thread at a time can call any particular lazy
375   /// stub, and 2) any thread modifying LLVM IR must hold the JIT's lock
376   /// (ExecutionEngine::lock) or otherwise ensure that no other thread calls a
377   /// lazy stub.  See http://llvm.org/PR5184 for details.
378   void DisableLazyCompilation(bool Disabled = true) {
379     CompilingLazily = !Disabled;
380   }
381   bool isCompilingLazily() const {
382     return CompilingLazily;
383   }
384   // Deprecated in favor of isCompilingLazily (to reduce double-negatives).
385   // Remove this in LLVM 2.8.
386   bool isLazyCompilationDisabled() const {
387     return !CompilingLazily;
388   }
389
390   /// DisableGVCompilation - If called, the JIT will abort if it's asked to
391   /// allocate space and populate a GlobalVariable that is not internal to
392   /// the module.
393   void DisableGVCompilation(bool Disabled = true) {
394     GVCompilationDisabled = Disabled;
395   }
396   bool isGVCompilationDisabled() const {
397     return GVCompilationDisabled;
398   }
399
400   /// DisableSymbolSearching - If called, the JIT will not try to lookup unknown
401   /// symbols with dlsym.  A client can still use InstallLazyFunctionCreator to
402   /// resolve symbols in a custom way.
403   void DisableSymbolSearching(bool Disabled = true) {
404     SymbolSearchingDisabled = Disabled;
405   }
406   bool isSymbolSearchingDisabled() const {
407     return SymbolSearchingDisabled;
408   }
409
410   /// InstallLazyFunctionCreator - If an unknown function is needed, the
411   /// specified function pointer is invoked to create it.  If it returns null,
412   /// the JIT will abort.
413   void InstallLazyFunctionCreator(void* (*P)(const std::string &)) {
414     LazyFunctionCreator = P;
415   }
416
417   /// InstallExceptionTableRegister - The JIT will use the given function
418   /// to register the exception tables it generates.
419   void InstallExceptionTableRegister(EERegisterFn F) {
420     ExceptionTableRegister = F;
421   }
422   void InstallExceptionTableDeregister(EERegisterFn F) {
423     ExceptionTableDeregister = F;
424   }
425
426   /// RegisterTable - Registers the given pointer as an exception table.  It
427   /// uses the ExceptionTableRegister function.
428   void RegisterTable(const Function *fn, void* res) {
429     if (ExceptionTableRegister) {
430       ExceptionTableRegister(res);
431       AllExceptionTables[fn] = res;
432     }
433   }
434
435   /// DeregisterTable - Deregisters the exception frame previously registered
436   /// for the given function.
437   void DeregisterTable(const Function *Fn) {
438     if (ExceptionTableDeregister) {
439       DenseMap<const Function*, void*>::iterator frame =
440         AllExceptionTables.find(Fn);
441       if(frame != AllExceptionTables.end()) {
442         ExceptionTableDeregister(frame->second);
443         AllExceptionTables.erase(frame);
444       }
445     }
446   }
447
448   /// DeregisterAllTables - Deregisters all previously registered pointers to an
449   /// exception tables.  It uses the ExceptionTableoDeregister function.
450   void DeregisterAllTables();
451
452 protected:
453   explicit ExecutionEngine(Module *M);
454
455   void emitGlobals();
456
457   void EmitGlobalVariable(const GlobalVariable *GV);
458
459   GenericValue getConstantValue(const Constant *C);
460   void LoadValueFromMemory(GenericValue &Result, GenericValue *Ptr,
461                            Type *Ty);
462 };
463
464 namespace EngineKind {
465   // These are actually bitmasks that get or-ed together.
466   enum Kind {
467     JIT         = 0x1,
468     Interpreter = 0x2
469   };
470   const static Kind Either = (Kind)(JIT | Interpreter);
471 }
472
473 /// EngineBuilder - Builder class for ExecutionEngines.  Use this by
474 /// stack-allocating a builder, chaining the various set* methods, and
475 /// terminating it with a .create() call.
476 class EngineBuilder {
477 private:
478   Module *M;
479   EngineKind::Kind WhichEngine;
480   std::string *ErrorStr;
481   CodeGenOpt::Level OptLevel;
482   JITMemoryManager *JMM;
483   bool AllocateGVsWithCode;
484   TargetOptions Options;
485   Reloc::Model RelocModel;
486   CodeModel::Model CMModel;
487   std::string MArch;
488   std::string MCPU;
489   SmallVector<std::string, 4> MAttrs;
490   bool UseMCJIT;
491
492   /// InitEngine - Does the common initialization of default options.
493   void InitEngine() {
494     WhichEngine = EngineKind::Either;
495     ErrorStr = NULL;
496     OptLevel = CodeGenOpt::Default;
497     JMM = NULL;
498     Options = TargetOptions();
499     AllocateGVsWithCode = false;
500     RelocModel = Reloc::Default;
501     CMModel = CodeModel::JITDefault;
502     UseMCJIT = false;
503   }
504
505 public:
506   /// EngineBuilder - Constructor for EngineBuilder.  If create() is called and
507   /// is successful, the created engine takes ownership of the module.
508   EngineBuilder(Module *m) : M(m) {
509     InitEngine();
510   }
511
512   /// setEngineKind - Controls whether the user wants the interpreter, the JIT,
513   /// or whichever engine works.  This option defaults to EngineKind::Either.
514   EngineBuilder &setEngineKind(EngineKind::Kind w) {
515     WhichEngine = w;
516     return *this;
517   }
518
519   /// setJITMemoryManager - Sets the memory manager to use.  This allows
520   /// clients to customize their memory allocation policies.  If create() is
521   /// called and is successful, the created engine takes ownership of the
522   /// memory manager.  This option defaults to NULL.
523   EngineBuilder &setJITMemoryManager(JITMemoryManager *jmm) {
524     JMM = jmm;
525     return *this;
526   }
527
528   /// setErrorStr - Set the error string to write to on error.  This option
529   /// defaults to NULL.
530   EngineBuilder &setErrorStr(std::string *e) {
531     ErrorStr = e;
532     return *this;
533   }
534
535   /// setOptLevel - Set the optimization level for the JIT.  This option
536   /// defaults to CodeGenOpt::Default.
537   EngineBuilder &setOptLevel(CodeGenOpt::Level l) {
538     OptLevel = l;
539     return *this;
540   }
541
542   /// setTargetOptions - Set the target options that the ExecutionEngine
543   /// target is using. Defaults to TargetOptions().
544   EngineBuilder &setTargetOptions(const TargetOptions &Opts) {
545     Options = Opts;
546     return *this;
547   }
548
549   /// setRelocationModel - Set the relocation model that the ExecutionEngine
550   /// target is using. Defaults to target specific default "Reloc::Default".
551   EngineBuilder &setRelocationModel(Reloc::Model RM) {
552     RelocModel = RM;
553     return *this;
554   }
555
556   /// setCodeModel - Set the CodeModel that the ExecutionEngine target
557   /// data is using. Defaults to target specific default
558   /// "CodeModel::JITDefault".
559   EngineBuilder &setCodeModel(CodeModel::Model M) {
560     CMModel = M;
561     return *this;
562   }
563
564   /// setAllocateGVsWithCode - Sets whether global values should be allocated
565   /// into the same buffer as code.  For most applications this should be set
566   /// to false.  Allocating globals with code breaks freeMachineCodeForFunction
567   /// and is probably unsafe and bad for performance.  However, we have clients
568   /// who depend on this behavior, so we must support it.  This option defaults
569   /// to false so that users of the new API can safely use the new memory
570   /// manager and free machine code.
571   EngineBuilder &setAllocateGVsWithCode(bool a) {
572     AllocateGVsWithCode = a;
573     return *this;
574   }
575
576   /// setMArch - Override the architecture set by the Module's triple.
577   EngineBuilder &setMArch(StringRef march) {
578     MArch.assign(march.begin(), march.end());
579     return *this;
580   }
581
582   /// setMCPU - Target a specific cpu type.
583   EngineBuilder &setMCPU(StringRef mcpu) {
584     MCPU.assign(mcpu.begin(), mcpu.end());
585     return *this;
586   }
587
588   /// setUseMCJIT - Set whether the MC-JIT implementation should be used
589   /// (experimental).
590   EngineBuilder &setUseMCJIT(bool Value) {
591     UseMCJIT = Value;
592     return *this;
593   }
594
595   /// setMAttrs - Set cpu-specific attributes.
596   template<typename StringSequence>
597   EngineBuilder &setMAttrs(const StringSequence &mattrs) {
598     MAttrs.clear();
599     MAttrs.append(mattrs.begin(), mattrs.end());
600     return *this;
601   }
602
603   /// selectTarget - Pick a target either via -march or by guessing the native
604   /// arch.  Add any CPU features specified via -mcpu or -mattr.
605   static TargetMachine *selectTarget(const Triple &TargetTriple,
606                                      StringRef MArch,
607                                      StringRef MCPU,
608                                      const SmallVectorImpl<std::string>& MAttrs,
609                                      const TargetOptions &Options,
610                                      Reloc::Model RM,
611                                      CodeModel::Model CM,
612                                      CodeGenOpt::Level OL,
613                                      std::string *Err);
614
615   ExecutionEngine *create();
616 };
617
618 } // End llvm namespace
619
620 #endif