clang 20.0.0git
|
GlobalDeclID means DeclID in the current ASTContext and LocalDeclID means DeclID specific to a certain ModuleFile. More...
#include "clang/AST/DeclID.h"
Public Types | |
using | DeclID = uint64_t |
An ID number that refers to a declaration in an AST file. | |
Public Member Functions | |
DeclID | getRawValue () const |
operator DeclID () const | |
operator PredefinedDeclIDs () const | |
bool | isValid () const |
bool | isInvalid () const |
unsigned | getModuleFileIndex () const |
unsigned | getLocalDeclIndex () const |
Protected Member Functions | |
DeclIDBase () | |
DeclIDBase (DeclID ID) | |
Protected Attributes | |
DeclID | ID |
Friends | |
bool | operator== (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator!= (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator< (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator<= (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator> (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator>= (const DeclIDBase &LHS, const DeclID &RHS) |
bool | operator== (const DeclIDBase &LHS, const DeclIDBase &RHS) |
bool | operator!= (const DeclIDBase &LHS, const DeclIDBase &RHS) |
bool | operator< (const DeclIDBase &LHS, const DeclIDBase &RHS) |
bool | operator> (const DeclIDBase &LHS, const DeclIDBase &RHS) |
bool | operator<= (const DeclIDBase &LHS, const DeclIDBase &RHS) |
bool | operator>= (const DeclIDBase &LHS, const DeclIDBase &RHS) |
GlobalDeclID means DeclID in the current ASTContext and LocalDeclID means DeclID specific to a certain ModuleFile.
Specially, in ASTWriter, the LocalDeclID to the ModuleFile been writting is equal to the GlobalDeclID. Outside the serializer, all the DeclID been used should be GlobalDeclID. We can translate a LocalDeclID to the GlobalDeclID by ASTReader::getGlobalDeclID()
.
using clang::DeclIDBase::DeclID = uint64_t |
An ID number that refers to a declaration in an AST file.
The ID numbers of declarations are consecutive (in order of discovery), with values below NUM_PREDEF_DECL_IDS being reserved. At the start of a chain of precompiled headers, declaration ID 1 is used for the translation unit declaration.
DeclID should only be used directly in serialization. All other users should use LocalDeclID or GlobalDeclID.
|
inlineexplicitprotected |
unsigned DeclIDBase::getLocalDeclIndex | ( | ) | const |
Definition at line 2217 of file DeclBase.cpp.
Referenced by clang::ASTReader::getGlobalDeclID(), and clang::ASTReader::mapGlobalIDToModuleFileGlobalID().
|
inline |
Definition at line 130 of file DeclID.h.
References ID.
Referenced by clang::ASTReader::getGlobalDeclID().
|
inline |
Definition at line 120 of file DeclID.h.
References ID.
Referenced by clang::ASTReader::getGlobalDeclID(), llvm::DenseMapInfo< clang::GlobalDeclID >::getHashValue(), clang::ASTReader::mapGlobalIDToModuleFileGlobalID(), clang::ASTDeclReader::VisitCXXRecordDeclImpl(), clang::ASTDeclReader::VisitFriendDecl(), clang::ASTDeclReader::VisitOMPDeclareMapperDecl(), and clang::ASTDeclReader::VisitOMPDeclareReductionDecl().
|
inline |
Definition at line 128 of file DeclID.h.
References ID, and clang::PREDEF_DECL_NULL_ID.
Referenced by clang::ASTDeclReader::VisitDecl(), and clang::ASTDeclReader::VisitRedeclarable().
|
inline |
Definition at line 126 of file DeclID.h.
References ID, and clang::PREDEF_DECL_NULL_ID.
Referenced by clang::ASTDeclMerger::mergeRedeclarableImpl(), clang::ASTDeclReader::Visit(), clang::ASTDeclReader::VisitCXXRecordDeclImpl(), and clang::ASTDeclReader::VisitNamespaceDecl().
|
inlineexplicit |
|
inlineexplicit |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Definition at line 176 of file DeclID.h.
Referenced by clang::LocalDeclID::get(), getModuleFileIndex(), getRawValue(), isInvalid(), isValid(), operator DeclID(), clang::GlobalDeclID::operator LocalDeclID(), operator PredefinedDeclIDs(), and clang::LocalDeclID::operator++().