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"
56 llvm::DenseSet<GlobalDeclID>
Found;
63 if (
Data.size() <= 4) {
75 if (
Found.insert(ID).second)
88 static std::pair<unsigned, unsigned>
92 data_type_builder &Val);
95 To.
Data.reserve(To.
Data.size() + From.size());
130 unsigned DataLen, data_type_builder &Val);
155 data_type_builder &Val);
178 llvm::DenseSet<LazySpecializationInfo>
Found;
185 if (
Data.size() <= 4) {
189 Data.push_back(Info);
197 if (
Found.insert(Info).second)
198 Data.push_back(Info);
209 : Reader(Reader), F(F) {}
223 static std::pair<unsigned, unsigned>
229 data_type_builder &Val);
232 To.
Data.reserve(To.
Data.size() + From.size());
265 static std::pair<unsigned, unsigned>
289 bool hasMacroDefinitionInDependencies =
false;
296 : Reader(Reader), F(F), KnownII(II) {}
299 const unsigned char* d,
307 return hasMacroDefinitionInDependencies;
314 llvm::OnDiskIterableChainedHashTable<ASTIdentifierLookupTrait>;
339 : Reader(Reader), F(F) {}
351 static std::pair<unsigned, unsigned>
360 llvm::OnDiskChainedHashTable<ASTSelectorLookupTrait>;
392 : Reader(Reader), M(M) {}
398 static std::pair<unsigned, unsigned>
401 static internal_key_type
ReadKey(
const unsigned char *d,
unsigned);
411 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.
Describes a module or submodule.
ObjCMethodDecl - Represents an instance or class method declaration.
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.
ASTDeclContextNameLookupTraitBase(ASTReader &Reader, ModuleFile &F)
static const int MaxTables
SmallVector< GlobalDeclID, 4 > data_type
The lookup result is a list of global declaration IDs.
static void MergeDataInto(const data_type &From, data_type_builder &To)
static std::pair< unsigned, unsigned > ReadKeyDataLength(const unsigned char *&d)
void ReadDataIntoImpl(const unsigned char *d, unsigned DataLen, data_type_builder &Val)
file_type ReadFileRef(const unsigned char *&d)
DeclarationNameKey ReadKeyBase(const unsigned char *&d)
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
DeclarationName external_key_type
internal_key_type ReadKey(const unsigned char *d, unsigned)
static internal_key_type GetInternalKey(const external_key_type &Name)
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)
ASTIdentifierLookupTrait(ASTReader &Reader, ModuleFile &F, IdentifierInfo *II=nullptr)
IdentifierID ReadIdentifierID(const unsigned char *d)
bool hasMoreInformationInDependencies() const
ASTReader & getReader() const
data_type ReadData(const internal_key_type &k, const unsigned char *d, unsigned DataLen)
IdentifierInfo * data_type
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)
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)
unsigned external_key_type
SmallVector< LazySpecializationInfo, 4 > data_type
The lookup result is a list of global declaration IDs.
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)
ModuleLocalNameLookupTrait(ASTReader &Reader, ModuleFile &F)
static bool EqualKey(const internal_key_type &a, const internal_key_type &b)
std::pair< DeclarationName, const Module * > external_key_type
void ReadDataInto(internal_key_type, const unsigned char *d, unsigned DataLen, data_type_builder &Val)
std::pair< DeclarationNameKey, unsigned > internal_key_type
internal_key_type ReadKey(const unsigned char *d, unsigned)
static hash_value_type ComputeHash(const internal_key_type &Key)
static internal_key_type GetInternalKey(const external_key_type &Key)
llvm::OnDiskChainedHashTable< ASTSelectorLookupTrait > ASTSelectorLookupTable
The on-disk hash table used for the global method pool.
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.
GlobalDeclID LazySpecializationInfo
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.
CustomizableOptional< FileEntryRef > OptionalFileEntryRef
data_type_builder(data_type &D)
llvm::DenseSet< GlobalDeclID > Found
void insert(GlobalDeclID ID)
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)
MultiOnDiskHashTable< ModuleLocalNameLookupTrait > Table