1//===- ASTDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the ASTDeserializationListener class, which is notified 11// by the ASTReader whenever a type or declaration is deserialized. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_CLANG_FRONTEND_AST_DESERIALIZATION_LISTENER_H 16#define LLVM_CLANG_FRONTEND_AST_DESERIALIZATION_LISTENER_H 17 18#include "clang/Serialization/ASTBitCodes.h" 19 20namespace clang { 21 22class Decl; 23class ASTReader; 24class QualType; 25class MacroDefinition; 26class Module; 27 28class ASTDeserializationListener { 29protected: 30 virtual ~ASTDeserializationListener(); 31 32public: 33 34 /// \brief The ASTReader was initialized. 35 virtual void ReaderInitialized(ASTReader *Reader) { } 36 37 /// \brief An identifier was deserialized from the AST file. 38 virtual void IdentifierRead(serialization::IdentID ID, 39 IdentifierInfo *II) { } 40 /// \brief A type was deserialized from the AST file. The ID here has the 41 /// qualifier bits already removed, and T is guaranteed to be locally 42 /// unqualified. 43 virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { } 44 /// \brief A decl was deserialized from the AST file. 45 virtual void DeclRead(serialization::DeclID ID, const Decl *D) { } 46 /// \brief A selector was read from the AST file. 47 virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { } 48 /// \brief A macro definition was read from the AST file. 49 virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, 50 MacroDefinition *MD) { } 51 /// \brief A macro definition that had previously been deserialized 52 /// (and removed via IdentifierRead) has now been made visible. 53 virtual void MacroVisible(IdentifierInfo *II) { } 54 /// \brief A module definition was read from the AST file. 55 virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) { } 56}; 57 58} 59 60#endif 61