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_FRONTEND_AST_DESERIALIZATION_LISTENER_H 00016 #define LLVM_CLANG_FRONTEND_AST_DESERIALIZATION_LISTENER_H 00017 00018 #include "clang/Serialization/ASTBitCodes.h" 00019 00020 namespace clang { 00021 00022 class Decl; 00023 class ASTReader; 00024 class QualType; 00025 class MacroDefinition; 00026 class Module; 00027 00028 class ASTDeserializationListener { 00029 protected: 00030 virtual ~ASTDeserializationListener(); 00031 00032 public: 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 type was deserialized from the AST file. The ID here has the 00041 /// qualifier bits already removed, and T is guaranteed to be locally 00042 /// unqualified. 00043 virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { } 00044 /// \brief A decl was deserialized from the AST file. 00045 virtual void DeclRead(serialization::DeclID ID, const Decl *D) { } 00046 /// \brief A selector was read from the AST file. 00047 virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { } 00048 /// \brief A macro definition was read from the AST file. 00049 virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, 00050 MacroDefinition *MD) { } 00051 /// \brief A macro definition that had previously been deserialized 00052 /// (and removed via IdentifierRead) has now been made visible. 00053 virtual void MacroVisible(IdentifierInfo *II) { } 00054 /// \brief A module definition was read from the AST file. 00055 virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) { } 00056 }; 00057 00058 } 00059 00060 #endif