LLVM  10.0.0svn
Classes | Public Types | Public Member Functions | List of all members
llvm::StackMapParser< Endianness > Class Template Reference

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

#include "llvm/Object/StackMapParser.h"

Classes

class  AccessorIterator
 
class  ConstantAccessor
 Accessor for constants. More...
 
class  FunctionAccessor
 Accessor for function records. More...
 
class  LiveOutAccessor
 Accessor for stackmap live-out fields. More...
 
class  LocationAccessor
 Accessor for location records. More...
 
class  RecordAccessor
 Accessor for stackmap records. More...
 

Public Types

enum  LocationKind : uint8_t {
  LocationKind::Register = 1, LocationKind::Direct = 2, LocationKind::Indirect = 3, LocationKind::Constant = 4,
  LocationKind::ConstantIndex = 5
}
 
using function_iterator = AccessorIterator< FunctionAccessor >
 
using constant_iterator = AccessorIterator< ConstantAccessor >
 
using record_iterator = AccessorIterator< RecordAccessor >
 

Public Member Functions

 StackMapParser (ArrayRef< uint8_t > StackMapSection)
 Construct a parser for a version-3 stackmap. More...
 
unsigned getVersion () const
 Get the version number of this stackmap. (Always returns 3). More...
 
uint32_t getNumFunctions () const
 Get the number of functions in the stack map. More...
 
uint32_t getNumConstants () const
 Get the number of large constants in the stack map. More...
 
uint32_t getNumRecords () const
 Get the number of stackmap records in the stackmap. More...
 
FunctionAccessor getFunction (unsigned FunctionIndex) const
 Return an FunctionAccessor for the given function index. More...
 
function_iterator functions_begin () const
 Begin iterator for functions. More...
 
function_iterator functions_end () const
 End iterator for functions. More...
 
iterator_range< function_iteratorfunctions () const
 Iterator range for functions. More...
 
ConstantAccessor getConstant (unsigned ConstantIndex) const
 Return the large constant at the given index. More...
 
constant_iterator constants_begin () const
 Begin iterator for constants. More...
 
constant_iterator constants_end () const
 End iterator for constants. More...
 
iterator_range< constant_iteratorconstants () const
 Iterator range for constants. More...
 
RecordAccessor getRecord (unsigned RecordIndex) const
 Return a RecordAccessor for the given record index. More...
 
record_iterator records_begin () const
 Begin iterator for records. More...
 
record_iterator records_end () const
 End iterator for records. More...
 
iterator_range< record_iteratorrecords () const
 Iterator range for records. More...
 

Detailed Description

template<support::endianness Endianness>
class llvm::StackMapParser< Endianness >

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

Definition at line 24 of file StackMapParser.h.

Member Typedef Documentation

◆ constant_iterator

template<support::endianness Endianness>
using llvm::StackMapParser< Endianness >::constant_iterator = AccessorIterator<ConstantAccessor>

Definition at line 322 of file StackMapParser.h.

◆ function_iterator

template<support::endianness Endianness>
using llvm::StackMapParser< Endianness >::function_iterator = AccessorIterator<FunctionAccessor>

Definition at line 321 of file StackMapParser.h.

◆ record_iterator

template<support::endianness Endianness>
using llvm::StackMapParser< Endianness >::record_iterator = AccessorIterator<RecordAccessor>

Definition at line 323 of file StackMapParser.h.

Member Enumeration Documentation

◆ LocationKind

template<support::endianness Endianness>
enum llvm::StackMapParser::LocationKind : uint8_t
strong
Enumerator
Register 
Direct 
Indirect 
Constant 
ConstantIndex 

Definition at line 103 of file StackMapParser.h.

Constructor & Destructor Documentation

◆ StackMapParser()

template<support::endianness Endianness>
llvm::StackMapParser< Endianness >::StackMapParser ( ArrayRef< uint8_t >  StackMapSection)
inline

Construct a parser for a version-3 stackmap.

StackMap data will be read from the given array.

Definition at line 304 of file StackMapParser.h.

References assert(), E, llvm::StackMapParser< Endianness >::getNumConstants(), llvm::StackMapParser< Endianness >::getNumFunctions(), llvm::StackMapParser< Endianness >::getNumRecords(), and I.

Member Function Documentation

◆ constants()

template<support::endianness Endianness>
iterator_range<constant_iterator> llvm::StackMapParser< Endianness >::constants ( ) const
inline

◆ constants_begin()

template<support::endianness Endianness>
constant_iterator llvm::StackMapParser< Endianness >::constants_begin ( ) const
inline

Begin iterator for constants.

Definition at line 373 of file StackMapParser.h.

References llvm::StackMapParser< Endianness >::getConstant().

Referenced by llvm::StackMapParser< Endianness >::constants().

◆ constants_end()

template<support::endianness Endianness>
constant_iterator llvm::StackMapParser< Endianness >::constants_end ( ) const
inline

End iterator for constants.

Definition at line 378 of file StackMapParser.h.

References llvm::StackMapParser< Endianness >::getNumConstants().

Referenced by llvm::StackMapParser< Endianness >::constants().

◆ functions()

template<support::endianness Endianness>
iterator_range<function_iterator> llvm::StackMapParser< Endianness >::functions ( ) const
inline

◆ functions_begin()

template<support::endianness Endianness>
function_iterator llvm::StackMapParser< Endianness >::functions_begin ( ) const
inline

Begin iterator for functions.

Definition at line 350 of file StackMapParser.h.

References llvm::StackMapParser< Endianness >::getFunction().

Referenced by llvm::StackMapParser< Endianness >::functions().

◆ functions_end()

template<support::endianness Endianness>
function_iterator llvm::StackMapParser< Endianness >::functions_end ( ) const
inline

End iterator for functions.

Definition at line 355 of file StackMapParser.h.

References llvm::StackMapParser< Endianness >::getNumFunctions().

Referenced by llvm::StackMapParser< Endianness >::functions().

◆ getConstant()

template<support::endianness Endianness>
ConstantAccessor llvm::StackMapParser< Endianness >::getConstant ( unsigned  ConstantIndex) const
inline

Return the large constant at the given index.

Definition at line 367 of file StackMapParser.h.

Referenced by llvm::StackMapParser< Endianness >::constants_begin().

◆ getFunction()

template<support::endianness Endianness>
FunctionAccessor llvm::StackMapParser< Endianness >::getFunction ( unsigned  FunctionIndex) const
inline

Return an FunctionAccessor for the given function index.

Definition at line 344 of file StackMapParser.h.

Referenced by llvm::StackMapParser< Endianness >::functions_begin().

◆ getNumConstants()

template<support::endianness Endianness>
uint32_t llvm::StackMapParser< Endianness >::getNumConstants ( ) const
inline

Get the number of large constants in the stack map.

Definition at line 334 of file StackMapParser.h.

Referenced by llvm::StackMapParser< Endianness >::constants_end(), and llvm::StackMapParser< Endianness >::StackMapParser().

◆ getNumFunctions()

template<support::endianness Endianness>
uint32_t llvm::StackMapParser< Endianness >::getNumFunctions ( ) const
inline

Get the number of functions in the stack map.

Definition at line 329 of file StackMapParser.h.

Referenced by llvm::StackMapParser< Endianness >::functions_end(), and llvm::StackMapParser< Endianness >::StackMapParser().

◆ getNumRecords()

template<support::endianness Endianness>
uint32_t llvm::StackMapParser< Endianness >::getNumRecords ( ) const
inline

◆ getRecord()

template<support::endianness Endianness>
RecordAccessor llvm::StackMapParser< Endianness >::getRecord ( unsigned  RecordIndex) const
inline

Return a RecordAccessor for the given record index.

Definition at line 390 of file StackMapParser.h.

Referenced by llvm::StackMapParser< Endianness >::records_begin(), and llvm::StackMapParser< Endianness >::records_end().

◆ getVersion()

template<support::endianness Endianness>
unsigned llvm::StackMapParser< Endianness >::getVersion ( ) const
inline

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

Definition at line 326 of file StackMapParser.h.

◆ records()

template<support::endianness Endianness>
iterator_range<record_iterator> llvm::StackMapParser< Endianness >::records ( ) const
inline

◆ records_begin()

template<support::endianness Endianness>
record_iterator llvm::StackMapParser< Endianness >::records_begin ( ) const
inline

◆ records_end()

template<support::endianness Endianness>
record_iterator llvm::StackMapParser< Endianness >::records_end ( ) const
inline

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