LLVM  10.0.0svn
RuntimeDyldCOFF.h
Go to the documentation of this file.
1 //===-- RuntimeDyldCOFF.h - Run-time dynamic linker for MC-JIT ---*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // COFF support for MC-JIT runtime dynamic linker.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_RUNTIME_DYLD_COFF_H
14 #define LLVM_RUNTIME_DYLD_COFF_H
15 
16 #include "RuntimeDyldImpl.h"
17 
18 #define DEBUG_TYPE "dyld"
19 
20 using namespace llvm;
21 
22 namespace llvm {
23 
24 // Common base class for COFF dynamic linker support.
25 // Concrete subclasses for each target can be found in ./Targets.
27 
28 public:
29  std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
30  loadObject(const object::ObjectFile &Obj) override;
31  bool isCompatibleFile(const object::ObjectFile &Obj) const override;
32 
33  static std::unique_ptr<RuntimeDyldCOFF>
36 
37 protected:
39  JITSymbolResolver &Resolver)
40  : RuntimeDyldImpl(MemMgr, Resolver) {}
41  uint64_t getSymbolOffset(const SymbolRef &Sym);
42 };
43 
44 } // end namespace llvm
45 
46 #undef DEBUG_TYPE
47 
48 #endif
bool isCompatibleFile(const object::ObjectFile &Obj) const override
This class represents lattice values for constants.
Definition: AllocatorList.h:23
RuntimeDyldCOFF(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
RuntimeDyld::MemoryManager & MemMgr
This class is the base class for all object file types.
Definition: ObjectFile.h:221
uint64_t getSymbolOffset(const SymbolRef &Sym)
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Definition: Record.h:1864
Symbol resolution interface.
Definition: JITSymbol.h:325
This is a value type class that represents a single symbol in the list of symbols in the object file...
Definition: ObjectFile.h:160
Triple::ArchType Arch
static std::unique_ptr< RuntimeDyldCOFF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &Obj) override