LLVM 22.0.0git
Functions
SFrameParser.cpp File Reference
#include "llvm/Object/SFrameParser.h"
#include "llvm/BinaryFormat/SFrame.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"

Go to the source code of this file.

Functions

static Expected< ArrayRef< uint8_t > > getDataSlice (ArrayRef< uint8_t > Data, uint64_t Offset, uint64_t Size)
 
template<typename T >
static Expected< ArrayRef< T > > getDataSliceAsArrayOf (ArrayRef< uint8_t > Data, uint64_t Offset, uint64_t Count)
 
template<typename T >
static Expected< const T & > getDataSliceAs (ArrayRef< uint8_t > Data, uint64_t Offset)
 
template<typename EndianT >
static Error readArray (ArrayRef< uint8_t > Data, uint64_t Count, uint64_t &Offset, SmallVectorImpl< int32_t > &Vec)
 
template<typename T , endianness E>
static Error readFRE (ArrayRef< uint8_t > Data, uint64_t &Offset, typename SFrameParser< E >::FrameRowEntry &FRE)
 
static std::optional< int32_t > getOffset (ArrayRef< int32_t > Offsets, size_t Idx)
 

Function Documentation

◆ getDataSlice()

static Expected< ArrayRef< uint8_t > > getDataSlice ( ArrayRef< uint8_t Data,
uint64_t  Offset,
uint64_t  Size 
)
static

◆ getDataSliceAs()

template<typename T >
static Expected< const T & > getDataSliceAs ( ArrayRef< uint8_t Data,
uint64_t  Offset 
)
static

Definition at line 47 of file SFrameParser.cpp.

References llvm::Offset.

◆ getDataSliceAsArrayOf()

template<typename T >
static Expected< ArrayRef< T > > getDataSliceAsArrayOf ( ArrayRef< uint8_t Data,
uint64_t  Offset,
uint64_t  Count 
)
static

Definition at line 36 of file SFrameParser.cpp.

References getDataSlice(), and llvm::Offset.

◆ getOffset()

static std::optional< int32_t > getOffset ( ArrayRef< int32_t >  Offsets,
size_t  Idx 
)
static

Definition at line 187 of file SFrameParser.cpp.

References Idx.

Referenced by llvm::logicalview::LVLine::getAddress().

◆ readArray()

template<typename EndianT >
static Error readArray ( ArrayRef< uint8_t Data,
uint64_t  Count,
uint64_t Offset,
SmallVectorImpl< int32_t > &  Vec 
)
static

◆ readFRE()

template<typename T , endianness E>
static Error readFRE ( ArrayRef< uint8_t Data,
uint64_t Offset,
typename SFrameParser< E >::FrameRowEntry &  FRE 
)
static