LLVM  16.0.0git

#include "ExecutionEngine/JITLink/MachOLinkGraphBuilder.h"

## Classes

class  NormalizedSection

struct  NormalizedSymbol

## Public Member Functions

Expected< std::unique_ptr< LinkGraph > > buildGraph ()

## Protected Types

using SectionParserFunction = std::function< Error(NormalizedSection &S)>

## Protected Member Functions

const object::MachOObjectFilegetObject () const

void addCustomSectionParser (StringRef SectionName, SectionParserFunction Parse)

template<typename... ArgTs>
NormalizedSymbolcreateNormalizedSymbol (ArgTs &&... Args)
Create a symbol. More...

NormalizedSectiongetSectionByIndex (unsigned Index)
Index is zero-based (MachO section indexes are usually one-based) and assumed to be in-range. More...

Expected< NormalizedSection & > findSectionByIndex (unsigned Index)
Try to get the section at the given index. More...

Expected< NormalizedSymbol & > findSymbolByIndex (uint64_t Index)
Try to get the symbol at the given index. More...

Returns the symbol with the highest address not greater than the search address, or null if no such symbol exists. More...

Returns the symbol with the highest address not greater than the search address, or an error if no such symbol exists. More...

MachO::relocation_info getRelocationInfo (const object::relocation_iterator RelItr)

## Static Protected Member Functions

static Scope getScope (StringRef Name, uint8_t Type)

static bool isAltEntry (const NormalizedSymbol &NSym)

static bool isDebugSection (const NormalizedSection &NSec)

static bool isZeroFillSection (const NormalizedSection &NSec)

## Detailed Description

Definition at line 29 of file MachOLinkGraphBuilder.h.

## ◆ SectionParserFunction

 protected

Definition at line 83 of file MachOLinkGraphBuilder.h.

## Constructor & Destructor Documentation

virtualdefault

protected

Definition at line 49 of file MachOLinkGraphBuilder.cpp.

## Member Function Documentation

protected

Definition at line 60 of file MachOLinkGraphBuilder.cpp.

protectedpure virtual

## ◆ buildGraph()

Definition at line 25 of file MachOLinkGraphBuilder.cpp.

## ◆ createNormalizedSymbol()

template<typename... ArgTs>
inlineprotected

Create a symbol.

Definition at line 99 of file MachOLinkGraphBuilder.h.

References Allocator, and llvm::AMDGPU::HSAMD::Kernel::Key::Args.

## ◆ findSectionByIndex()

inlineprotected

Try to get the section at the given index.

Will return an error if the given index is out of range, or if no section has been added for the given index.

Definition at line 117 of file MachOLinkGraphBuilder.h.

References llvm::formatv(), and I.

inlineprotected

Returns the symbol with the highest address not greater than the search address, or an error if no such symbol exists.

Definition at line 149 of file MachOLinkGraphBuilder.h.

## ◆ findSymbolByIndex()

inlineprotected

Try to get the symbol at the given index.

Will return an error if the given index is out of range, or if no symbol has been added for the given index.

Definition at line 128 of file MachOLinkGraphBuilder.h.

References assert(), llvm::formatv(), and I.

## ◆ getGraph()

inlineprotected

Definition at line 88 of file MachOLinkGraphBuilder.h.

References G.

staticprotected

Definition at line 67 of file MachOLinkGraphBuilder.cpp.

## ◆ getObject()

inlineprotected

Definition at line 90 of file MachOLinkGraphBuilder.h.

Referenced by getRelocationInfo().

inlineprotected

## ◆ getScope()

staticprotected

Definition at line 73 of file MachOLinkGraphBuilder.cpp.

## ◆ getSectionByIndex()

inlineprotected

Index is zero-based (MachO section indexes are usually one-based) and assumed to be in-range.

Client is responsible for checking.

Definition at line 108 of file MachOLinkGraphBuilder.h.

References assert(), and I.

inlineprotected

Returns the symbol with the highest address not greater than the search address, or null if no such symbol exists.

Definition at line 139 of file MachOLinkGraphBuilder.h.

## ◆ isAltEntry()

staticprotected

Definition at line 83 of file MachOLinkGraphBuilder.cpp.