13 #ifndef LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H 14 #define LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H 20 #include "llvm/ADT/DenseSet.h" 21 #include "llvm/ADT/SmallVector.h" 22 #include "llvm/ADT/StringRef.h" 23 #include "llvm/Support/OnDiskHashTable.h" 31 struct HeaderFileInfo;
33 class IdentifierTable;
36 namespace serialization {
63 if (Found.empty() && !Data.empty()) {
64 if (Data.size() <= 4) {
73 Found.insert(Data.begin(), Data.end());
76 if (Found.insert(ID).second)
88 : Reader(Reader), F(F) {}
102 static std::pair<unsigned, unsigned>
111 To.
Data.reserve(To.
Data.size() + From.size());
144 static std::pair<unsigned, unsigned>
173 : Reader(Reader), F(F), KnownII(II) {}
176 const unsigned char*
d,
179 IdentID ReadIdentifierID(
const unsigned char *d);
187 llvm::OnDiskIterableChainedHashTable<ASTIdentifierLookupTrait>;
212 : Reader(Reader), F(F) {}
224 static std::pair<unsigned, unsigned>
233 llvm::OnDiskChainedHashTable<ASTSelectorLookupTrait>;
248 const char *FrameworkStrings;
267 const char *FrameworkStrings)
268 : Reader(Reader), M(M), HS(HS), FrameworkStrings(FrameworkStrings) {}
274 static std::pair<unsigned, unsigned>
284 llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>;
292 #endif // LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H
Smart pointer class that efficiently represents Objective-C method names.
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
static internal_key_type GetInternalKey(const external_key_type &Name)
DeclarationName external_key_type
Class that performs name lookup into a DeclContext stored in an AST file.
static void MergeDataInto(const data_type &From, data_type_builder &To)
SmallVector< ObjCMethodDecl *, 2 > Instance
static const external_key_type & GetExternalKey(const internal_key_type &x)
static const internal_key_type & GetInternalKey(const external_key_type &x)
One of these records is kept for each identifier that is lexed.
llvm::OnDiskChainedHashTable< HeaderFileInfoTrait > HeaderFileInfoLookupTable
The on-disk hash table used for known header files.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
unsigned getHash() const
Compute a fingerprint of this key for use in on-disk hash table.
static hash_value_type ComputeHash(const internal_key_type &Key)
A collection of on-disk hash tables, merged when relevant for performance.
StringRef external_key_type
ASTReader & getReader() const
data_type_builder(data_type &D)
Base class for the trait describing the on-disk hash table for the identifiers in an AST file...
Information about a module that has been loaded by the ASTReader.
ASTDeclContextNameLookupTrait(ASTReader &Reader, ModuleFile &F)
llvm::DenseSet< DeclID > Found
SmallVector< ObjCMethodDecl *, 2 > Factory
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
file_type ReadFileRef(const unsigned char *&d)
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
Cached information about one file (either on disk or in the virtual file system). ...
Class that performs lookup for a selector's entries in the global method pool stored in an AST file...
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Dataflow Directional Tag Classes.
Reads an AST files chain containing the contents of a translation unit.
The name of a declaration.
llvm::OnDiskChainedHashTable< ASTSelectorLookupTrait > ASTSelectorLookupTable
The on-disk hash table used for the global method pool.
Class that performs lookup for an identifier stored in an AST file.
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
void ReadDataInto(internal_key_type, const unsigned char *d, unsigned DataLen, data_type_builder &Val)
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
bool InstanceHasMoreThanOneDecl
A key used when looking up entities by DeclarationName.
bool FactoryHasMoreThanOneDecl
ASTSelectorLookupTrait(ASTReader &Reader, ModuleFile &F)
llvm::OnDiskIterableChainedHashTable< ASTIdentifierLookupTrait > ASTIdentifierLookupTable
The on-disk hash table used to contain information about all of the identifiers in the program...
ASTIdentifierLookupTrait(ASTReader &Reader, ModuleFile &F, IdentifierInfo *II=nullptr)
MultiOnDiskHashTable< ASTDeclContextNameLookupTrait > Table
internal_key_type ReadKey(const unsigned char *d, unsigned)
static const int MaxTables
static const internal_key_type & GetInternalKey(const external_key_type &x)
StringRef internal_key_type