LLVM 23.0.0git
llvm::gsym::FileEntry Struct Reference

Files in GSYM are contained in FileEntry structs where we split the directory and basename into two different strings in the string table. More...

#include "llvm/DebugInfo/GSYM/FileEntry.h"

Public Member Functions

 FileEntry ()=default
 FileEntry (gsym_strp_t D, gsym_strp_t B)
bool operator== (const FileEntry &RHS) const
bool operator!= (const FileEntry &RHS) const

Static Public Member Functions

static constexpr uint64_t getEncodedSize (uint8_t StringOffsetSize)
 Returns the on-disk encoded size of a FileEntry for the given string offset size.

Public Attributes

gsym_strp_t Dir = 0
 Offsets in the string table.
gsym_strp_t Base = 0

Detailed Description

Files in GSYM are contained in FileEntry structs where we split the directory and basename into two different strings in the string table.

This allows paths to shared commont directory and filename strings and saves space.

Definition at line 25 of file FileEntry.h.

Constructor & Destructor Documentation

◆ FileEntry() [1/2]

llvm::gsym::FileEntry::FileEntry ( )
default

Referenced by operator!=(), and operator==().

◆ FileEntry() [2/2]

llvm::gsym::FileEntry::FileEntry ( gsym_strp_t D,
gsym_strp_t B )
inline

Definition at line 34 of file FileEntry.h.

References B(), Base, D(), and Dir.

Member Function Documentation

◆ getEncodedSize()

constexpr uint64_t llvm::gsym::FileEntry::getEncodedSize ( uint8_t StringOffsetSize)
inlinestaticconstexpr

Returns the on-disk encoded size of a FileEntry for the given string offset size.

It's different from sizeof(FileEntry) because of padding.

Definition at line 38 of file FileEntry.h.

Referenced by llvm::gsym::GsymCreatorV2::encode(), llvm::gsym::GsymReader::getFile(), llvm::gsym::GsymReaderV1::parseHeaderAndGlobalDataEntries(), and llvm::gsym::GsymReader::setFileTableData().

◆ operator!=()

bool llvm::gsym::FileEntry::operator!= ( const FileEntry & RHS) const
inline

Definition at line 47 of file FileEntry.h.

References Base, Dir, FileEntry(), and RHS.

◆ operator==()

bool llvm::gsym::FileEntry::operator== ( const FileEntry & RHS) const
inline

Definition at line 44 of file FileEntry.h.

References Base, Dir, FileEntry(), and RHS.

Member Data Documentation

◆ Base

◆ Dir

gsym_strp_t llvm::gsym::FileEntry::Dir = 0

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