LLVM  10.0.0svn
Classes | Public Member Functions | Protected Types | Protected Member Functions | List of all members
llvm::jitlink::MachOAtomGraphBuilder Class Referenceabstract

#include "ExecutionEngine/JITLink/MachOAtomGraphBuilder.h"

Classes

class  MachOSection
 

Public Member Functions

virtual ~MachOAtomGraphBuilder ()
 
Expected< std::unique_ptr< AtomGraph > > buildGraph ()
 

Protected Types

using OffsetToAtomMap = std::map< JITTargetAddress, DefinedAtom * >
 
using CustomAtomizeFunction = std::function< Error(MachOSection &S)>
 

Protected Member Functions

 MachOAtomGraphBuilder (const object::MachOObjectFile &Obj)
 
AtomGraphgetGraph () const
 
const object::MachOObjectFilegetObject () const
 
void addCustomAtomizer (StringRef SectionName, CustomAtomizeFunction Atomizer)
 
virtual Error addRelocations ()=0
 
bool areLayoutLocked (const Atom &A, const Atom &B)
 Returns true if Atom A and Atom B are at a fixed offset from one another (i.e. More...
 

Detailed Description

Definition at line 25 of file MachOAtomGraphBuilder.h.

Member Typedef Documentation

◆ CustomAtomizeFunction

Definition at line 101 of file MachOAtomGraphBuilder.h.

◆ OffsetToAtomMap

Definition at line 31 of file MachOAtomGraphBuilder.h.

Constructor & Destructor Documentation

◆ ~MachOAtomGraphBuilder()

llvm::jitlink::MachOAtomGraphBuilder::~MachOAtomGraphBuilder ( )
virtual

Definition at line 20 of file MachOAtomGraphBuilder.cpp.

◆ MachOAtomGraphBuilder()

llvm::jitlink::MachOAtomGraphBuilder::MachOAtomGraphBuilder ( const object::MachOObjectFile Obj)
protected

Definition at line 35 of file MachOAtomGraphBuilder.cpp.

Member Function Documentation

◆ addCustomAtomizer()

void llvm::jitlink::MachOAtomGraphBuilder::addCustomAtomizer ( StringRef  SectionName,
CustomAtomizeFunction  Atomizer 
)
protected

◆ addRelocations()

virtual Error llvm::jitlink::MachOAtomGraphBuilder::addRelocations ( )
protectedpure virtual

Referenced by getObject().

◆ areLayoutLocked()

bool llvm::jitlink::MachOAtomGraphBuilder::areLayoutLocked ( const Atom A,
const Atom B 
)
protected

Returns true if Atom A and Atom B are at a fixed offset from one another (i.e.

if they're part of the same alt-entry chain).

Definition at line 47 of file MachOAtomGraphBuilder.cpp.

References assert(), B, llvm::support::big, llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::count(), llvm::StringMap< ValueTy, AllocatorTy >::count(), llvm::dbgs(), E, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), first, llvm::format(), llvm::jitlink::Atom::getAddress(), llvm::object::ObjectFile::getCommonSymbolSize(), llvm::object::MachOObjectFile::getSection(), llvm::object::MachOObjectFile::getSection64(), llvm::object::MachOObjectFile::getSymbol64TableEntry(), llvm::object::MachOObjectFile::getSymbolTableEntry(), I, if(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::object::MachOObjectFile::is64Bit(), llvm::jitlink::Atom::isDefined(), llvm::object::Binary::isLittleEndian(), llvm::isPowerOf2_32(), llvm::support::little, LLVM_DEBUG, llvm::max(), llvm::sys::Memory::MF_EXEC, llvm::sys::Memory::MF_READ, llvm::sys::Memory::MF_WRITE, llvm::MachO::N_ALT_ENTRY, llvm::MachO::N_NO_DEAD_STRIP, Name, llvm::MachO::S_ATTR_NO_DEAD_STRIP, llvm::object::ObjectFile::sections(), llvm::object::BasicSymbolRef::SF_Absolute, llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_Exported, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Undefined, llvm::object::BasicSymbolRef::SF_Weak, llvm::sort(), llvm::object::SymbolRef::ST_Function, llvm::Error::success(), llvm::object::MachOObjectFile::symbol_begin(), llvm::object::MachOObjectFile::symbol_end(), and llvm::Expected< T >::takeError().

Referenced by getObject().

◆ buildGraph()

Expected< std::unique_ptr< AtomGraph > > llvm::jitlink::MachOAtomGraphBuilder::buildGraph ( )

Definition at line 22 of file MachOAtomGraphBuilder.cpp.

◆ getGraph()

AtomGraph& llvm::jitlink::MachOAtomGraphBuilder::getGraph ( ) const
inlineprotected

Definition at line 105 of file MachOAtomGraphBuilder.h.

References G.

◆ getObject()

const object::MachOObjectFile& llvm::jitlink::MachOAtomGraphBuilder::getObject ( ) const
inlineprotected

Definition at line 107 of file MachOAtomGraphBuilder.h.

References addCustomAtomizer(), addRelocations(), areLayoutLocked(), B, and G.


The documentation for this class was generated from the following files: