clang API Documentation
00001 //===- ASTDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the ASTDeserializationListener class, which is notified 00011 // by the ASTReader whenever a type or declaration is deserialized. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H 00016 #define LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H 00017 00018 #include "clang/Basic/IdentifierTable.h" 00019 #include "clang/Serialization/ASTBitCodes.h" 00020 00021 namespace clang { 00022 00023 class Decl; 00024 class ASTReader; 00025 class QualType; 00026 class MacroDefinition; 00027 class MacroInfo; 00028 class Module; 00029 00030 class ASTDeserializationListener { 00031 public: 00032 virtual ~ASTDeserializationListener(); 00033 00034 /// \brief The ASTReader was initialized. 00035 virtual void ReaderInitialized(ASTReader *Reader) { } 00036 00037 /// \brief An identifier was deserialized from the AST file. 00038 virtual void IdentifierRead(serialization::IdentID ID, 00039 IdentifierInfo *II) { } 00040 /// \brief A macro was read from the AST file. 00041 virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI) { } 00042 /// \brief A type was deserialized from the AST file. The ID here has the 00043 /// qualifier bits already removed, and T is guaranteed to be locally 00044 /// unqualified. 00045 virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { } 00046 /// \brief A decl was deserialized from the AST file. 00047 virtual void DeclRead(serialization::DeclID ID, const Decl *D) { } 00048 /// \brief A selector was read from the AST file. 00049 virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { } 00050 /// \brief A macro definition was read from the AST file. 00051 virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, 00052 MacroDefinition *MD) { } 00053 /// \brief A module definition was read from the AST file. 00054 virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) { } 00055 }; 00056 00057 } 00058 00059 #endif