16#ifndef LLVM_CLANG_AST_DECLID_H
17#define LLVM_CLANG_AST_DECLID_H
19#include "llvm/ADT/DenseMapInfo.h"
20#include "llvm/ADT/Hashing.h"
21#include "llvm/ADT/iterator.h"
134 return LHS.
ID == RHS;
143 return LHS.
ID <= RHS;
149 return LHS.
ID >= RHS;
153 return LHS.
ID == RHS.
ID;
156 return LHS.
ID != RHS.
ID;
161 return LHS.
ID < RHS.
ID;
164 return LHS.
ID > RHS.
ID;
167 return LHS.
ID <= RHS.
ID;
170 return LHS.
ID >= RHS.
ID;
179namespace serialization {
231template <
class FromTy,
class ToTy>
233 :
public llvm::iterator_adaptor_base<DeclIDIterator<FromTy, ToTy>,
235 std::forward_iterator_tag, ToTy> {
255 return GlobalDeclID(DenseMapInfo<DeclID>::getEmptyKey());
259 return GlobalDeclID(DenseMapInfo<DeclID>::getTombstoneKey());
263 return DenseMapInfo<DeclID>::getHashValue(Key.
getRawValue());
276 return LocalDeclID(DenseMapInfo<DeclID>::getEmptyKey());
280 return LocalDeclID(DenseMapInfo<DeclID>::getTombstoneKey());
284 return DenseMapInfo<DeclID>::getHashValue(Key.
getRawValue());
Reads an AST files chain containing the contents of a translation unit.
Writes an AST file containing the contents of a translation unit.
GlobalDeclID means DeclID in the current ASTContext and LocalDeclID means DeclID specific to a certai...
friend bool operator!=(const DeclIDBase &LHS, const DeclID &RHS)
friend bool operator==(const DeclIDBase &LHS, const DeclIDBase &RHS)
friend bool operator>(const DeclIDBase &LHS, const DeclIDBase &RHS)
unsigned getModuleFileIndex() const
friend bool operator<(const DeclIDBase &LHS, const DeclID &RHS)
DeclID getRawValue() const
friend bool operator==(const DeclIDBase &LHS, const DeclID &RHS)
unsigned getLocalDeclIndex() const
friend bool operator!=(const DeclIDBase &LHS, const DeclIDBase &RHS)
uint64_t DeclID
An ID number that refers to a declaration in an AST file.
friend bool operator<=(const DeclIDBase &LHS, const DeclIDBase &RHS)
friend bool operator<=(const DeclIDBase &LHS, const DeclID &RHS)
friend bool operator>=(const DeclIDBase &LHS, const DeclIDBase &RHS)
friend bool operator>(const DeclIDBase &LHS, const DeclID &RHS)
friend bool operator>=(const DeclIDBase &LHS, const DeclID &RHS)
friend bool operator<(const DeclIDBase &LHS, const DeclIDBase &RHS)
A helper iterator adaptor to convert the iterators to SmallVector<SomeDeclID> to the iterators to Sma...
DeclIDIterator(const FromTy *ID)
bool operator==(const DeclIDIterator &RHS) const
GlobalDeclID(unsigned ModuleFileIndex, unsigned LocalID)
LocalDeclID & operator++()
friend class GlobalDeclID
static LocalDeclID get(ASTReader &Reader, serialization::ModuleFile &MF, DeclID ID)
LocalDeclID operator++(int)
Information about a module that has been loaded by the ASTReader.
The JSON file list parser is used to communicate input to InstallAPI.
PredefinedDeclIDs
Predefined declaration IDs.
@ PREDEF_DECL_CF_CONSTANT_STRING_TAG_ID
The internal '__NSConstantString' tag type.
@ PREDEF_DECL_COMMON_TYPE_ID
The internal '__builtin_common_type' template.
@ PREDEF_DECL_TRANSLATION_UNIT_ID
The translation unit.
@ PREDEF_DECL_TYPE_PACK_ELEMENT_ID
The internal '__type_pack_element' template.
@ PREDEF_DECL_OBJC_CLASS_ID
The Objective-C 'Class' type.
@ PREDEF_DECL_BUILTIN_MS_GUID_ID
The predeclared '_GUID' struct.
@ PREDEF_DECL_OBJC_INSTANCETYPE_ID
The internal 'instancetype' typedef.
@ PREDEF_DECL_OBJC_PROTOCOL_ID
The Objective-C 'Protocol' type.
@ PREDEF_DECL_UNSIGNED_INT_128_ID
The unsigned 128-bit integer type.
@ PREDEF_DECL_OBJC_SEL_ID
The Objective-C 'SEL' type.
@ NUM_PREDEF_DECL_IDS
The number of declaration IDs that are predefined.
@ PREDEF_DECL_INT_128_ID
The signed 128-bit integer type.
@ PREDEF_DECL_VA_LIST_TAG
The internal '__va_list_tag' struct, if any.
@ PREDEF_DECL_BUILTIN_MS_VA_LIST_ID
The internal '__builtin_ms_va_list' typedef.
@ PREDEF_DECL_CF_CONSTANT_STRING_ID
The internal '__NSConstantString' typedef.
@ PREDEF_DECL_NULL_ID
The NULL declaration.
@ PREDEF_DECL_BUILTIN_VA_LIST_ID
The internal '__builtin_va_list' typedef.
@ PREDEF_DECL_EXTERN_C_CONTEXT_ID
The extern "C" context.
@ PREDEF_DECL_OBJC_ID_ID
The Objective-C 'id' type.
@ PREDEF_DECL_MAKE_INTEGER_SEQ_ID
The internal '__make_integer_seq' template.
Diagnostic wrappers for TextAPI types for error reporting.
GlobalDeclID::DeclID DeclID
static GlobalDeclID getTombstoneKey()
static unsigned getHashValue(const GlobalDeclID &Key)
static GlobalDeclID getEmptyKey()
static bool isEqual(const GlobalDeclID &L, const GlobalDeclID &R)
static unsigned getHashValue(const LocalDeclID &Key)
static LocalDeclID getTombstoneKey()
static bool isEqual(const LocalDeclID &L, const LocalDeclID &R)
static LocalDeclID getEmptyKey()
LocalDeclID::DeclID DeclID