14 #ifndef LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H 15 #define LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H 21 #include "llvm/ADT/DenseSet.h" 22 #include "llvm/ADT/SmallVector.h" 23 #include "llvm/ADT/StringRef.h" 24 #include "llvm/Support/OnDiskHashTable.h" 32 struct HeaderFileInfo;
34 class IdentifierTable;
37 namespace serialization {
64 if (Found.empty() && !Data.empty()) {
65 if (Data.size() <= 4) {
74 Found.insert(Data.begin(), Data.end());
77 if (Found.insert(ID).second)
89 : Reader(Reader), F(F) {}
103 static std::pair<unsigned, unsigned>
112 To.
Data.reserve(To.
Data.size() + From.size());
145 static std::pair<unsigned, unsigned>
174 : Reader(Reader), F(F), KnownII(II) {}
177 const unsigned char* d,
180 IdentID ReadIdentifierID(
const unsigned char *d);
188 llvm::OnDiskIterableChainedHashTable<ASTIdentifierLookupTrait>;
213 : Reader(Reader), F(F) {}
225 static std::pair<unsigned, unsigned>
234 llvm::OnDiskChainedHashTable<ASTSelectorLookupTrait>;
249 const char *FrameworkStrings;
268 const char *FrameworkStrings)
269 : Reader(Reader), M(M), HS(HS), FrameworkStrings(FrameworkStrings) {}
275 static std::pair<unsigned, unsigned>
285 llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>;
293 #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.
DeclarationName - 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