LLVM 20.0.0git
|
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 class | LocationKind : uint8_t { Register = 1 , Direct = 2 , Indirect = 3 , Constant = 4 , 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. | |
unsigned | getVersion () const |
Get the version number of this stackmap. (Always returns 3). | |
uint32_t | getNumFunctions () const |
Get the number of functions in the stack map. | |
uint32_t | getNumConstants () const |
Get the number of large constants in the stack map. | |
uint32_t | getNumRecords () const |
Get the number of stackmap records in the stackmap. | |
FunctionAccessor | getFunction (unsigned FunctionIndex) const |
Return an FunctionAccessor for the given function index. | |
function_iterator | functions_begin () const |
Begin iterator for functions. | |
function_iterator | functions_end () const |
End iterator for functions. | |
iterator_range< function_iterator > | functions () const |
Iterator range for functions. | |
ConstantAccessor | getConstant (unsigned ConstantIndex) const |
Return the large constant at the given index. | |
constant_iterator | constants_begin () const |
Begin iterator for constants. | |
constant_iterator | constants_end () const |
End iterator for constants. | |
iterator_range< constant_iterator > | constants () const |
Iterator range for constants. | |
RecordAccessor | getRecord (unsigned RecordIndex) const |
Return a RecordAccessor for the given record index. | |
record_iterator | records_begin () const |
Begin iterator for records. | |
record_iterator | records_end () const |
End iterator for records. | |
iterator_range< record_iterator > | records () const |
Iterator range for records. | |
Static Public Member Functions | |
static Error | validateHeader (ArrayRef< uint8_t > StackMapSection) |
Validates the header of the specified stack map section. | |
A parser for the latest stackmap format. At the moment, latest=V3.
Definition at line 24 of file StackMapParser.h.
using llvm::StackMapParser< Endianness >::constant_iterator = AccessorIterator<ConstantAccessor> |
Definition at line 341 of file StackMapParser.h.
using llvm::StackMapParser< Endianness >::function_iterator = AccessorIterator<FunctionAccessor> |
Definition at line 340 of file StackMapParser.h.
using llvm::StackMapParser< Endianness >::record_iterator = AccessorIterator<RecordAccessor> |
Definition at line 342 of file StackMapParser.h.
|
strong |
Enumerator | |
---|---|
Register | |
Direct | |
Indirect | |
Constant | |
ConstantIndex |
Definition at line 105 of file StackMapParser.h.
|
inline |
Construct a parser for a version-3 stackmap.
StackMap data will be read from the given array.
Definition at line 306 of file StackMapParser.h.
References assert(), E, llvm::StackMapParser< Endianness >::getNumConstants(), llvm::StackMapParser< Endianness >::getNumFunctions(), llvm::StackMapParser< Endianness >::getNumRecords(), and I.
|
inline |
Iterator range for constants.
Definition at line 404 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::constants_begin(), llvm::StackMapParser< Endianness >::constants_end(), and llvm::make_range().
|
inline |
Begin iterator for constants.
Definition at line 392 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::getConstant().
Referenced by llvm::StackMapParser< Endianness >::constants().
|
inline |
End iterator for constants.
Definition at line 397 of file StackMapParser.h.
References llvm::ArrayRef< T >::data(), and llvm::StackMapParser< Endianness >::getNumConstants().
Referenced by llvm::StackMapParser< Endianness >::constants().
|
inline |
Iterator range for functions.
Definition at line 381 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::functions_begin(), llvm::StackMapParser< Endianness >::functions_end(), and llvm::make_range().
|
inline |
Begin iterator for functions.
Definition at line 369 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::getFunction().
Referenced by llvm::StackMapParser< Endianness >::functions().
|
inline |
End iterator for functions.
Definition at line 374 of file StackMapParser.h.
References llvm::ArrayRef< T >::data(), and llvm::StackMapParser< Endianness >::getNumFunctions().
Referenced by llvm::StackMapParser< Endianness >::functions().
|
inline |
Return the large constant at the given index.
Definition at line 386 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::ConstantIndex, and llvm::ArrayRef< T >::data().
Referenced by llvm::StackMapParser< Endianness >::constants_begin().
|
inline |
Return an FunctionAccessor for the given function index.
Definition at line 363 of file StackMapParser.h.
References llvm::ArrayRef< T >::data().
Referenced by llvm::StackMapParser< Endianness >::functions_begin().
|
inline |
Get the number of large constants in the stack map.
Definition at line 353 of file StackMapParser.h.
Referenced by llvm::StackMapParser< Endianness >::constants_end(), and llvm::StackMapParser< Endianness >::StackMapParser().
|
inline |
Get the number of functions in the stack map.
Definition at line 348 of file StackMapParser.h.
Referenced by llvm::StackMapParser< Endianness >::functions_end(), and llvm::StackMapParser< Endianness >::StackMapParser().
|
inline |
Get the number of stackmap records in the stackmap.
Definition at line 358 of file StackMapParser.h.
Referenced by llvm::StackMapParser< Endianness >::records_begin(), llvm::StackMapParser< Endianness >::records_end(), and llvm::StackMapParser< Endianness >::StackMapParser().
|
inline |
Return a RecordAccessor for the given record index.
Definition at line 409 of file StackMapParser.h.
References llvm::ArrayRef< T >::data().
Referenced by llvm::StackMapParser< Endianness >::records_begin(), and llvm::StackMapParser< Endianness >::records_end().
|
inline |
Get the version number of this stackmap. (Always returns 3).
Definition at line 345 of file StackMapParser.h.
|
inline |
Iterator range for records.
Definition at line 432 of file StackMapParser.h.
References llvm::make_range(), llvm::StackMapParser< Endianness >::records_begin(), and llvm::StackMapParser< Endianness >::records_end().
|
inline |
Begin iterator for records.
Definition at line 415 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::getNumRecords(), and llvm::StackMapParser< Endianness >::getRecord().
Referenced by llvm::StackMapParser< Endianness >::records().
|
inline |
End iterator for records.
Definition at line 422 of file StackMapParser.h.
References llvm::StackMapParser< Endianness >::getNumRecords(), and llvm::StackMapParser< Endianness >::getRecord().
Referenced by llvm::StackMapParser< Endianness >::records().
|
inlinestatic |
Validates the header of the specified stack map section.
Definition at line 324 of file StackMapParser.h.
References llvm::object::createError(), llvm::ArrayRef< T >::size(), llvm::Error::success(), and llvm::Version.