//===- ASTReaderInternals.h - AST Reader Internals --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file provides internal definitions used in the AST reader. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H #define LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H #include "MultiOnDiskHashTable.h" #include "clang/AST/DeclarationName.h" #include "clang/Basic/LLVM.h" #include "clang/Serialization/ASTBitCodes.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/OnDiskHashTable.h" #include <ctime> #include <utility> namespace clang { class ASTReader; class FileEntry; struct HeaderFileInfo; class HeaderSearch; class ObjCMethodDecl; namespace serialization { class ModuleFile; namespace reader { /// Class that performs name lookup into a DeclContext stored /// in an AST file. class ASTDeclContextNameLookupTrait { … }; struct DeclContextLookupTable { … }; /// Base class for the trait describing the on-disk hash table for the /// identifiers in an AST file. /// /// This class is not useful by itself; rather, it provides common /// functionality for accessing the on-disk hash table of identifiers /// in an AST file. Different subclasses customize that functionality /// based on what information they are interested in. Those subclasses /// must provide the \c data_type type and the ReadData operation, only. class ASTIdentifierLookupTraitBase { … }; /// Class that performs lookup for an identifier stored in an AST file. class ASTIdentifierLookupTrait : public ASTIdentifierLookupTraitBase { … }; /// The on-disk hash table used to contain information about /// all of the identifiers in the program. ASTIdentifierLookupTable; /// Class that performs lookup for a selector's entries in the global /// method pool stored in an AST file. class ASTSelectorLookupTrait { … }; /// The on-disk hash table used for the global method pool. ASTSelectorLookupTable; /// Trait class used to search the on-disk hash table containing all of /// the header search information. /// /// The on-disk hash table contains a mapping from each header path to /// information about that header (how many times it has been included, its /// controlling macro, etc.). Note that we actually hash based on the size /// and mtime, and support "deep" comparisons of file names based on current /// inode numbers, so that the search can cope with non-normalized path names /// and symlinks. class HeaderFileInfoTrait { … }; /// The on-disk hash table used for known header files. HeaderFileInfoLookupTable; } // namespace reader } // namespace serialization } // namespace clang #endif // LLVM_CLANG_LIB_SERIALIZATION_ASTREADERINTERNALS_H