class StackMapParser

Declaration

template <support::endianness Endianness>
class StackMapParser { /* full declaration omitted */ };

Description

A parser for the latest stackmap format. At the moment, latest=V3.

Declared at: llvm/include/llvm/Object/StackMapParser.h:25

Templates

support::endianness Endianness

Member Variables

private ArrayRef<uint8_t> StackMapSection
private unsigned int ConstantsListOffset
private std::vector<unsigned int> StackMapRecordOffsets
private static const unsigned int HeaderOffset = 0
private static const unsigned int NumFunctionsOffset = HeaderOffset + sizeof(unsigned int)
private static const unsigned int NumConstantsOffset = NumFunctionsOffset + sizeof(unsigned int)
private static const unsigned int NumRecordsOffset = NumConstantsOffset + sizeof(unsigned int)
private static const unsigned int FunctionListOffset = NumRecordsOffset + sizeof(unsigned int)
private static const unsigned int FunctionSize = 3 * sizeof(unsigned long)
private static const unsigned int ConstantSize = sizeof(unsigned long)

Method Overview

  • public StackMapParser<Endianness>(ArrayRef<uint8_t> StackMapSection)
  • public iterator_range<llvm::StackMapParser::constant_iterator> constants() const
  • public llvm::StackMapParser::constant_iterator constants_begin() const
  • public llvm::StackMapParser::constant_iterator constants_end() const
  • public iterator_range<llvm::StackMapParser::function_iterator> functions() const
  • public llvm::StackMapParser::function_iterator functions_begin() const
  • public llvm::StackMapParser::function_iterator functions_end() const
  • public llvm::StackMapParser::ConstantAccessor getConstant(unsigned int ConstantIndex) const
  • private std::size_t getConstantOffset(unsigned int ConstantIndex) const
  • public llvm::StackMapParser::FunctionAccessor getFunction(unsigned int FunctionIndex) const
  • private std::size_t getFunctionOffset(unsigned int FunctionIndex) const
  • public uint32_t getNumConstants() const
  • public uint32_t getNumFunctions() const
  • public uint32_t getNumRecords() const
  • public llvm::StackMapParser::RecordAccessor getRecord(unsigned int RecordIndex) const
  • public unsigned int getVersion() const
  • private template <typename T>static T read(const uint8_t * P)
  • public iterator_range<llvm::StackMapParser::record_iterator> records() const
  • public llvm::StackMapParser::record_iterator records_begin() const
  • public llvm::StackMapParser::record_iterator records_end() const
  • public static llvm::Error validateHeader(ArrayRef<uint8_t> StackMapSection)

Methods

StackMapParser<Endianness>(
    ArrayRef<uint8_t> StackMapSection)

Description

Construct a parser for a version-3 stackmap. StackMap data will be read from the given array.

Declared at: llvm/include/llvm/Object/StackMapParser.h:307

Parameters

ArrayRef<uint8_t> StackMapSection

iterator_range<
    llvm::StackMapParser::constant_iterator>
constants() const

Description

Iterator range for constants.

Declared at: llvm/include/llvm/Object/StackMapParser.h:405

llvm::StackMapParser::constant_iterator
constants_begin() const

Description

Begin iterator for constants.

Declared at: llvm/include/llvm/Object/StackMapParser.h:393

llvm::StackMapParser::constant_iterator
constants_end() const

Description

End iterator for constants.

Declared at: llvm/include/llvm/Object/StackMapParser.h:398

iterator_range<
    llvm::StackMapParser::function_iterator>
functions() const

Description

Iterator range for functions.

Declared at: llvm/include/llvm/Object/StackMapParser.h:382

llvm::StackMapParser::function_iterator
functions_begin() const

Description

Begin iterator for functions.

Declared at: llvm/include/llvm/Object/StackMapParser.h:370

llvm::StackMapParser::function_iterator
functions_end() const

Description

End iterator for functions.

Declared at: llvm/include/llvm/Object/StackMapParser.h:375

llvm::StackMapParser::ConstantAccessor
getConstant(unsigned int ConstantIndex) const

Description

Return the large constant at the given index.

Declared at: llvm/include/llvm/Object/StackMapParser.h:387

Parameters

unsigned int ConstantIndex

std::size_t getConstantOffset(
    unsigned int ConstantIndex) const

Declared at: llvm/include/llvm/Object/StackMapParser.h:456

Parameters

unsigned int ConstantIndex

llvm::StackMapParser::FunctionAccessor
getFunction(unsigned int FunctionIndex) const

Description

Return an FunctionAccessor for the given function index.

Declared at: llvm/include/llvm/Object/StackMapParser.h:364

Parameters

unsigned int FunctionIndex

std::size_t getFunctionOffset(
    unsigned int FunctionIndex) const

Declared at: llvm/include/llvm/Object/StackMapParser.h:452

Parameters

unsigned int FunctionIndex

uint32_t getNumConstants() const

Description

Get the number of large constants in the stack map.

Declared at: llvm/include/llvm/Object/StackMapParser.h:354

uint32_t getNumFunctions() const

Description

Get the number of functions in the stack map.

Declared at: llvm/include/llvm/Object/StackMapParser.h:349

uint32_t getNumRecords() const

Description

Get the number of stackmap records in the stackmap.

Declared at: llvm/include/llvm/Object/StackMapParser.h:359

llvm::StackMapParser::RecordAccessor getRecord(
    unsigned int RecordIndex) const

Description

Return a RecordAccessor for the given record index.

Declared at: llvm/include/llvm/Object/StackMapParser.h:410

Parameters

unsigned int RecordIndex

unsigned int getVersion() const

Description

Get the version number of this stackmap. (Always returns 3).

Declared at: llvm/include/llvm/Object/StackMapParser.h:346

template <typename T>
static T read(const uint8_t* P)

Declared at: llvm/include/llvm/Object/StackMapParser.h:439

Templates

T

Parameters

const uint8_t* P

iterator_range<
    llvm::StackMapParser::record_iterator>
records() const

Description

Iterator range for records.

Declared at: llvm/include/llvm/Object/StackMapParser.h:433

llvm::StackMapParser::record_iterator
records_begin() const

Description

Begin iterator for records.

Declared at: llvm/include/llvm/Object/StackMapParser.h:416

llvm::StackMapParser::record_iterator
records_end() const

Description

End iterator for records.

Declared at: llvm/include/llvm/Object/StackMapParser.h:423

static llvm::Error validateHeader(
    ArrayRef<uint8_t> StackMapSection)

Description

Validates the header of the specified stack map section.

Declared at: llvm/include/llvm/Object/StackMapParser.h:325

Parameters

ArrayRef<uint8_t> StackMapSection