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"
136 return LHS.
ID == RHS;
145 return LHS.
ID <= RHS;
151 return LHS.
ID >= RHS;
155 return LHS.
ID == RHS.
ID;
158 return LHS.
ID != RHS.
ID;
163 return LHS.
ID < RHS.
ID;
166 return LHS.
ID > RHS.
ID;
169 return LHS.
ID <= RHS.
ID;
172 return LHS.
ID >= RHS.
ID;
181namespace serialization {
232template <
class FromTy,
class ToTy>
234 :
public llvm::iterator_adaptor_base<DeclIDIterator<FromTy, ToTy>,
236 std::forward_iterator_tag, ToTy> {
256 return GlobalDeclID(DenseMapInfo<DeclID>::getEmptyKey());
260 return GlobalDeclID(DenseMapInfo<DeclID>::getTombstoneKey());
264 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++()
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.
const unsigned int NUM_PREDEF_DECL_IDS
The number of declaration IDs that are predefined.
PredefinedDeclIDs
Predefined declaration IDs.
@ PREDEF_DECL_CF_CONSTANT_STRING_TAG_ID
The internal '__NSConstantString' tag type.
@ 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.
@ 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)