LLVM  3.7.0
RuntimeDyldCOFF.h
Go to the documentation of this file.
1 //===-- RuntimeDyldCOFF.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 // COFF support for MC-JIT runtime dynamic linker.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_RUNTIME_DYLD_COFF_H
15 #define LLVM_RUNTIME_DYLD_COFF_H
16 
17 #include "RuntimeDyldImpl.h"
18 #include "llvm/ADT/DenseMap.h"
19 
20 #define DEBUG_TYPE "dyld"
21 
22 using namespace llvm;
23 
24 namespace llvm {
25 
26 // Common base class for COFF dynamic linker support.
27 // Concrete subclasses for each target can be found in ./Targets.
29 
30 public:
31  std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
32  loadObject(const object::ObjectFile &Obj) override;
33  bool isCompatibleFile(const object::ObjectFile &Obj) const override;
34 
35  static std::unique_ptr<RuntimeDyldCOFF>
38 
39 protected:
42  : RuntimeDyldImpl(MemMgr, Resolver) {}
43  uint64_t getSymbolOffset(const SymbolRef &Sym);
44 };
45 
46 } // end namespace llvm
47 
48 #undef DEBUG_TYPE
49 
50 #endif
bool isCompatibleFile(const object::ObjectFile &Obj) const override
RuntimeDyld::MemoryManager & MemMgr
RuntimeDyldCOFF(RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
This class is the base class for all object file types.
Definition: ObjectFile.h:176
uint64_t getSymbolOffset(const SymbolRef &Sym)
static std::unique_ptr< RuntimeDyldCOFF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
RuntimeDyld::SymbolResolver & Resolver
This is a value type class that represents a single symbol in the list of symbols in the object file...
Definition: ObjectFile.h:114
Triple::ArchType Arch
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &Obj) override