clang 19.0.0git
Public Member Functions | Public Attributes | List of all members
clang::serialization::DeclOffset Struct Reference

Source location and bit offset of a declaration. More...

#include "clang/Serialization/ASTBitCodes.h"

Public Member Functions

 DeclOffset ()=default
 
 DeclOffset (SourceLocation Loc, uint64_t BitOffset, uint64_t DeclTypesBlockStartOffset)
 
void setLocation (SourceLocation L)
 
SourceLocation getLocation () const
 
void setBitOffset (uint64_t Offset, const uint64_t DeclTypesBlockStartOffset)
 
uint64_t getBitOffset (const uint64_t DeclTypesBlockStartOffset) const
 

Public Attributes

SourceLocation::UIntTy Loc = 0
 Raw source location.
 
UnderalignedInt64 BitOffset
 Offset relative to the start of the DECLTYPES_BLOCK block.
 

Detailed Description

Source location and bit offset of a declaration.

Definition at line 241 of file ASTBitCodes.h.

Constructor & Destructor Documentation

◆ DeclOffset() [1/2]

clang::serialization::DeclOffset::DeclOffset ( )
default

◆ DeclOffset() [2/2]

clang::serialization::DeclOffset::DeclOffset ( SourceLocation  Loc,
uint64_t  BitOffset,
uint64_t  DeclTypesBlockStartOffset 
)
inline

Definition at line 251 of file ASTBitCodes.h.

References BitOffset, Loc, setBitOffset(), and setLocation().

Member Function Documentation

◆ getBitOffset()

uint64_t clang::serialization::DeclOffset::getBitOffset ( const uint64_t  DeclTypesBlockStartOffset) const
inline

◆ getLocation()

SourceLocation clang::serialization::DeclOffset::getLocation ( ) const
inline

Definition at line 259 of file ASTBitCodes.h.

References clang::SourceLocation::getFromRawEncoding(), and Loc.

◆ setBitOffset()

void clang::serialization::DeclOffset::setBitOffset ( uint64_t  Offset,
const uint64_t  DeclTypesBlockStartOffset 
)
inline

Definition at line 263 of file ASTBitCodes.h.

References BitOffset, and clang::serialization::UnderalignedInt64::setBitOffset().

Referenced by DeclOffset().

◆ setLocation()

void clang::serialization::DeclOffset::setLocation ( SourceLocation  L)
inline

Definition at line 257 of file ASTBitCodes.h.

References clang::SourceLocation::getRawEncoding(), and Loc.

Referenced by DeclOffset().

Member Data Documentation

◆ BitOffset

UnderalignedInt64 clang::serialization::DeclOffset::BitOffset

Offset relative to the start of the DECLTYPES_BLOCK block.

Keep structure alignment 32-bit and avoid padding gap because undefined value in the padding affects AST hash.

Definition at line 248 of file ASTBitCodes.h.

Referenced by DeclOffset(), getBitOffset(), and setBitOffset().

◆ Loc

SourceLocation::UIntTy clang::serialization::DeclOffset::Loc = 0

Raw source location.

Definition at line 243 of file ASTBitCodes.h.

Referenced by DeclOffset(), getLocation(), and setLocation().


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