|
LLVM 22.0.0git
|
#include "ExecutionEngine/JITLink/COFFLinkGraphBuilder.h"
Public Member Functions | |
| virtual | ~COFFLinkGraphBuilder () |
| Expected< std::unique_ptr< LinkGraph > > | buildGraph () |
Protected Types | |
| using | COFFSectionIndex = int32_t |
| using | COFFSymbolIndex = int32_t |
Protected Member Functions | |
| COFFLinkGraphBuilder (const object::COFFObjectFile &Obj, std::shared_ptr< orc::SymbolStringPool > SSP, Triple TT, SubtargetFeatures Features, LinkGraph::GetEdgeKindNameFunction GetEdgeKindName) | |
| LinkGraph & | getGraph () const |
| const object::COFFObjectFile & | getObject () const |
| virtual Error | addRelocations ()=0 |
| Error | graphifySections () |
| Error | graphifySymbols () |
| void | setGraphSymbol (COFFSectionIndex SecIndex, COFFSymbolIndex SymIndex, Symbol &Sym) |
| Symbol * | getGraphSymbol (COFFSymbolIndex SymIndex) const |
| void | setGraphBlock (COFFSectionIndex SecIndex, Block *B) |
| Block * | getGraphBlock (COFFSectionIndex SecIndex) const |
| Symbol & | addImageBaseSymbol (StringRef Name="__ImageBase") |
| object::COFFObjectFile::section_iterator_range | sections () const |
| template<typename RelocHandlerFunction> | |
| Error | forEachRelocation (const object::SectionRef &RelSec, RelocHandlerFunction &&Func, bool ProcessDebugSections=false) |
| Traverse all matching relocation records in the given section. | |
| template<typename ClassT, typename RelocHandlerMethod> | |
| Error | forEachRelocation (const object::SectionRef &RelSec, ClassT *Instance, RelocHandlerMethod &&Method, bool ProcessDebugSections=false) |
| Traverse all matching relocation records in the given section. | |
Definition at line 31 of file COFFLinkGraphBuilder.h.
|
protected |
Definition at line 37 of file COFFLinkGraphBuilder.h.
|
protected |
Definition at line 38 of file COFFLinkGraphBuilder.h.
|
virtualdefault |
|
protected |
Definition at line 28 of file COFFLinkGraphBuilder.cpp.
References llvm::jitlink::createTripleWithCOFFFormat(), llvm::dbgs(), getFileName(), LLVM_DEBUG, and llvm::move().
|
inlineprotected |
Definition at line 82 of file COFFLinkGraphBuilder.h.
References llvm::jitlink::Symbol::setLive().
|
protectedpure virtual |
Referenced by buildGraph().
Definition at line 73 of file COFFLinkGraphBuilder.cpp.
References addRelocations(), graphifySections(), graphifySymbols(), and llvm::make_error().
|
inlineprotected |
Traverse all matching relocation records in the given section.
Convenience wrapper to allow passing a member function for the handler.
Definition at line 106 of file COFFLinkGraphBuilder.h.
References forEachRelocation().
|
protected |
Traverse all matching relocation records in the given section.
The handler function Func should be callable with this signature: Error(const object::RelocationRef&, const object::SectionRef&, Section &)
Definition at line 193 of file COFFLinkGraphBuilder.h.
References llvm::dbgs(), getGraphBlock(), llvm::object::SectionRef::getIndex(), llvm::inconvertibleErrorCode(), LLVM_DEBUG, llvm::make_error(), llvm::object::SectionRef::relocations(), and llvm::Error::success().
Referenced by forEachRelocation().
|
inlineprotected |
Definition at line 45 of file COFFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 75 of file COFFLinkGraphBuilder.h.
Referenced by forEachRelocation().
|
inlineprotected |
Definition at line 62 of file COFFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 47 of file COFFLinkGraphBuilder.h.
|
protected |
Definition at line 115 of file COFFLinkGraphBuilder.cpp.
References B(), llvm::Data, llvm::dbgs(), llvm::orc::Exec, llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA, llvm::COFF::IMAGE_SCN_LNK_REMOVE, llvm::COFF::IMAGE_SCN_MEM_EXECUTE, llvm::COFF::IMAGE_SCN_MEM_READ, llvm::COFF::IMAGE_SCN_MEM_WRITE, LLVM_DEBUG, llvm::make_error(), llvm::orc::NoAlloc, llvm::orc::Read, setGraphBlock(), llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::orc::Write.
Referenced by buildGraph().
|
protected |
Definition at line 194 of file COFFLinkGraphBuilder.cpp.
References llvm::dbgs(), llvm::formatv(), llvm::COFF::isReservedSectionNumber(), LLVM_DEBUG, llvm::make_error(), setGraphSymbol(), llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::toString().
Referenced by buildGraph().
|
inlineprotected |
Definition at line 88 of file COFFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 69 of file COFFLinkGraphBuilder.h.
References assert(), B(), and llvm::COFF::isReservedSectionNumber().
Referenced by graphifySections().
|
inlineprotected |
Definition at line 54 of file COFFLinkGraphBuilder.h.
References assert(), llvm::jitlink::Symbol::getOffset(), and llvm::COFF::isReservedSectionNumber().
Referenced by graphifySymbols().