LLVM 20.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, 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 |
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 26 of file COFFLinkGraphBuilder.cpp.
References llvm::dbgs(), llvm::object::Binary::getFileName(), and LLVM_DEBUG.
|
protectedpure virtual |
Referenced by buildGraph().
Definition at line 79 of file COFFLinkGraphBuilder.cpp.
References addRelocations(), graphifySections(), and graphifySymbols().
|
inlineprotected |
Traverse all matching relocation records in the given section.
Convenience wrapper to allow passing a member function for the handler.
Definition at line 99 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 185 of file COFFLinkGraphBuilder.h.
References llvm::dbgs(), llvm::object::COFFObjectFile::getCOFFSection(), getGraphBlock(), llvm::object::SectionRef::getIndex(), llvm::object::COFFObjectFile::getSectionName(), llvm::inconvertibleErrorCode(), LLVM_DEBUG, Name, llvm::object::SectionRef::relocations(), and llvm::Error::success().
Referenced by forEachRelocation().
|
inlineprotected |
Definition at line 44 of file COFFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 74 of file COFFLinkGraphBuilder.h.
Referenced by forEachRelocation().
|
inlineprotected |
Definition at line 61 of file COFFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 46 of file COFFLinkGraphBuilder.h.
|
protected |
Definition at line 121 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::orc::NoAlloc, llvm::orc::Read, setGraphBlock(), llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::orc::Write.
Referenced by buildGraph().
|
protected |
Definition at line 200 of file COFFLinkGraphBuilder.cpp.
References Characteristics, llvm::dbgs(), llvm::formatv(), llvm::COFF::isReservedSectionNumber(), LLVM_DEBUG, setGraphSymbol(), llvm::Error::success(), Sym, llvm::object::coff_aux_weak_external::TagIndex, llvm::Expected< T >::takeError(), and llvm::dwarf::toString().
Referenced by buildGraph().
|
inlineprotected |
Definition at line 81 of file COFFLinkGraphBuilder.h.
References llvm::object::ObjectFile::sections().
|
inlineprotected |
Definition at line 68 of file COFFLinkGraphBuilder.h.
References assert(), B, and llvm::COFF::isReservedSectionNumber().
Referenced by graphifySections().
|
inlineprotected |
Definition at line 53 of file COFFLinkGraphBuilder.h.
References assert(), llvm::COFF::isReservedSectionNumber(), and Sym.
Referenced by graphifySymbols().