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());
138 llvm::DenseSet<LazySpecializationInfo>
Found;
145 if (
Data.size() <= 4) {
149 Data.push_back(Info);
157 if (
Found.insert(Info).second)
158 Data.push_back(Info);
169 : Reader(Reader), F(F) {}
183 static std::pair<unsigned, unsigned>
189 data_type_builder &Val);
192 To.
Data.reserve(To.
Data.size() + From.size());
225 static std::pair<unsigned, unsigned>
254 : Reader(Reader), F(F), KnownII(II) {}
257 const unsigned char* d,
268 llvm::OnDiskIterableChainedHashTable<ASTIdentifierLookupTrait>;
293 : Reader(Reader), F(F) {}
305 static std::pair<unsigned, unsigned>
314 llvm::OnDiskChainedHashTable<ASTSelectorLookupTrait>;
346 : Reader(Reader), M(M) {}
352 static std::pair<unsigned, unsigned>
355 static internal_key_type
ReadKey(
const unsigned char *d,
unsigned);
365 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...
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)
Class that performs lookup to specialized decls.
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
file_type ReadFileRef(const unsigned char *&d)
static internal_key_type GetInternalKey(const external_key_type &Name)
void ReadDataInto(internal_key_type, const unsigned char *d, unsigned DataLen, data_type_builder &Val)
unsigned internal_key_type
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
static void MergeDataInto(const data_type &From, data_type_builder &To)
static const int MaxTables
static hash_value_type ComputeHash(const internal_key_type &Key)
LazySpecializationInfoLookupTrait(ASTReader &Reader, ModuleFile &F)
internal_key_type ReadKey(const unsigned char *d, unsigned)
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
MultiOnDiskHashTable< LazySpecializationInfoLookupTrait > Table
llvm::DenseSet< LazySpecializationInfo > Found
void insert(LazySpecializationInfo Info)
data_type_builder(data_type &D)