//===--- ASTReader.h - AST File Reader --------------------------*- C++ -*-===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines the ASTReader class, which reads AST files.////===----------------------------------------------------------------------===//#ifndef LLVM_CLANG_FRONTEND_AST_READER_H#define LLVM_CLANG_FRONTEND_AST_READER_H#include"clang/Serialization/ASTBitCodes.h"#include"clang/Sema/ExternalSemaSource.h"#include"clang/AST/DeclarationName.h"#include"clang/AST/DeclObjC.h"#include"clang/AST/TemplateBase.h"#include"clang/Lex/ExternalPreprocessorSource.h"#include"clang/Lex/HeaderSearch.h"#include"clang/Lex/PreprocessingRecord.h"#include"clang/Basic/Diagnostic.h"#include"clang/Basic/IdentifierTable.h"#include"clang/Basic/SourceManager.h"#include"llvm/ADT/APFloat.h"#include"llvm/ADT/APInt.h"#include"llvm/ADT/APSInt.h"#include"llvm/ADT/OwningPtr.h"#include"llvm/ADT/SmallVector.h"#include"llvm/ADT/StringRef.h"#include"llvm/Bitcode/BitstreamReader.h"#include"llvm/Support/DataTypes.h"#include<deque>#include<map>#include<string>#include<utility>#include<vector>namespacellvm{classMemoryBuffer;}namespaceclang{classAddrLabelExpr;classASTConsumer;classASTContext;classASTIdentifierIterator;classAttr;classDecl;classDeclContext;classNestedNameSpecifier;classCXXBaseSpecifier;classCXXConstructorDecl;classCXXCtorInitializer;classGotoStmt;classMacroDefinition;classNamedDecl;classOpaqueValueExpr;classPreprocessor;classSema;classSwitchCase;classASTDeserializationListener;classASTReader;classASTDeclReader;classASTStmtReader;classASTIdentifierLookupTrait;classTypeLocReader;structHeaderFileInfo;classVersionTuple;structPCHPredefinesBlock{/// \brief The file ID for this predefines buffer in a PCH file.FileIDBufferID;/// \brief This predefines buffer in a PCH file.llvm::StringRefData;};typedefllvm::SmallVector<PCHPredefinesBlock,2>PCHPredefinesBlocks;/// \brief Abstract interface for callback invocations by the ASTReader.////// While reading an AST file, the ASTReader will call the methods of the/// listener to pass on specific information. Some of the listener methods can/// return true to indicate to the ASTReader that the information (and/// consequently the AST file) is invalid.classASTReaderListener{public:virtual~ASTReaderListener();/// \brief Receives the language options.////// \returns true to indicate the options are invalid or false otherwise.virtualboolReadLanguageOptions(constLangOptions&LangOpts){