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"
35namespace serialization {
56 llvm::DenseSet<GlobalDeclID>
Found;
63 if (
Data.size() <= 4) {
87 : Reader(Reader), F(F) {}
101 static std::pair<unsigned, unsigned>
107 unsigned DataLen, data_type_builder &Val);
110 To.
Data.reserve(To.
Data.size() + From.size());
143 static std::pair<unsigned, unsigned>
172 : Reader(Reader), F(F), KnownII(II) {}
175 const unsigned char* d,
186 llvm::OnDiskIterableChainedHashTable<ASTIdentifierLookupTrait>;
211 : Reader(Reader), F(F) {}
223 static std::pair<unsigned, unsigned>
232 llvm::OnDiskChainedHashTable<ASTSelectorLookupTrait>;
247 const char *FrameworkStrings;
266 const char *FrameworkStrings)
267 : Reader(Reader), M(M), HS(HS), FrameworkStrings(FrameworkStrings) {}
273 static std::pair<unsigned, unsigned>
276 static internal_key_type
ReadKey(
const unsigned char *d,
unsigned);
281 const FileEntry *getFile(
const internal_key_type &Key);
286 llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>;
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Reads an AST files chain containing the contents of a translation unit.
The name of a declaration.
A reference to a FileEntry that includes the name of the file as it was accessed by the FileManager's...
Cached information about one file (either on disk or in the virtual file system).
One of these records is kept for each identifier that is lexed.
Smart pointer class that efficiently represents Objective-C method names.
A key used when looking up entities by DeclarationName.
unsigned getHash() const
Compute a fingerprint of this key for use in on-disk hash table.
Information about a module that has been loaded by the ASTReader.
A collection of on-disk hash tables, merged when relevant for performance.
Class that performs name lookup into a DeclContext stored in an AST file.
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
internal_key_type ReadKey(const unsigned char *d, unsigned)
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
static internal_key_type GetInternalKey(const external_key_type &Name)
static const int MaxTables
static void MergeDataInto(const data_type &From, data_type_builder &To)
file_type ReadFileRef(const unsigned char *&d)
DeclarationNameKey internal_key_type
void ReadDataInto(internal_key_type, const unsigned char *d, unsigned DataLen, data_type_builder &Val)
static hash_value_type ComputeHash(const internal_key_type &Key)
ASTDeclContextNameLookupTrait(ASTReader &Reader, ModuleFile &F)
Base class for the trait describing the on-disk hash table for the identifiers in an AST file.
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
static const internal_key_type & GetInternalKey(const external_key_type &x)
static hash_value_type ComputeHash(const internal_key_type &a)
static const external_key_type & GetExternalKey(const internal_key_type &x)
StringRef external_key_type
StringRef internal_key_type
static internal_key_type ReadKey(const unsigned char *d, unsigned n)
Class that performs lookup for an identifier stored in an AST file.
ASTIdentifierLookupTrait(ASTReader &Reader, ModuleFile &F, IdentifierInfo *II=nullptr)
IdentifierID ReadIdentifierID(const unsigned char *d)
ASTReader & getReader() const
data_type ReadData(const internal_key_type &k, const unsigned char *d, unsigned DataLen)
IdentifierInfo * data_type
Class that performs lookup for a selector's entries in the global method pool stored in an AST file.
internal_key_type ReadKey(const unsigned char *d, unsigned)
ASTSelectorLookupTrait(ASTReader &Reader, ModuleFile &F)
data_type ReadData(Selector, const unsigned char *d, unsigned DataLen)
Selector external_key_type
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
static hash_value_type ComputeHash(Selector Sel)
static const internal_key_type & GetInternalKey(const external_key_type &x)
external_key_type internal_key_type
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
llvm::OnDiskChainedHashTable< HeaderFileInfoTrait > HeaderFileInfoLookupTable
The on-disk hash table used for known header files.
llvm::OnDiskIterableChainedHashTable< ASTIdentifierLookupTrait > ASTIdentifierLookupTable
The on-disk hash table used to contain information about all of the identifiers in the program.
llvm::OnDiskChainedHashTable< ASTSelectorLookupTrait > ASTSelectorLookupTable
The on-disk hash table used for the global method pool.
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
uint64_t IdentifierID
An ID number that refers to an identifier in an AST file.
The JSON file list parser is used to communicate input to InstallAPI.
data_type_builder(data_type &D)
void insert(GlobalDeclID ID)
llvm::DenseSet< GlobalDeclID > Found
SmallVector< ObjCMethodDecl *, 2 > Factory
bool FactoryHasMoreThanOneDecl
SmallVector< ObjCMethodDecl *, 2 > Instance
bool InstanceHasMoreThanOneDecl
MultiOnDiskHashTable< ASTDeclContextNameLookupTrait > Table