Propogate the error message, not just the error state.
[oota-llvm.git] / include / llvm / ExecutionEngine / RuntimeDyld.h
1 //===-- RuntimeDyld.h - Run-time dynamic linker for MC-JIT ------*- 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 // Interface for the runtime dynamic linker facilities of the MC-JIT.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_RUNTIME_DYLD_H
15 #define LLVM_RUNTIME_DYLD_H
16
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/Support/Memory.h"
19
20 namespace llvm {
21
22 class RuntimeDyldImpl;
23 class MemoryBuffer;
24
25 class RuntimeDyld {
26   RuntimeDyld(const RuntimeDyld &);     // DO NOT IMPLEMENT
27   void operator=(const RuntimeDyld &);  // DO NOT IMPLEMENT
28
29   // RuntimeDyldImpl is the actual class. RuntimeDyld is just the public
30   // interface.
31   RuntimeDyldImpl *Dyld;
32 public:
33   RuntimeDyld();
34   ~RuntimeDyld();
35
36   bool loadObject(MemoryBuffer *InputBuffer);
37   void *getSymbolAddress(StringRef Name);
38   // FIXME: Should be parameterized to get the memory block associated with
39   // a particular loaded object.
40   sys::MemoryBlock getMemoryBlock();
41   StringRef getErrorString();
42 };
43
44 } // end namespace llvm
45
46 #endif