]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / tools / clang / include / clang / Serialization / ASTDeserializationListener.h
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
20 namespace clang {
21
22 class Decl;
23 class ASTReader;
24 class QualType;
25 class MacroDefinition;
26   
27 class ASTDeserializationListener {
28 protected:
29   virtual ~ASTDeserializationListener();
30
31 public:
32
33   /// \brief The ASTReader was initialized.
34   virtual void ReaderInitialized(ASTReader *Reader) { }
35
36   /// \brief An identifier was deserialized from the AST file.
37   virtual void IdentifierRead(serialization::IdentID ID,
38                               IdentifierInfo *II) { }
39   /// \brief A type was deserialized from the AST file. The ID here has the
40   ///        qualifier bits already removed, and T is guaranteed to be locally
41   ///        unqualified.
42   virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { }
43   /// \brief A decl was deserialized from the AST file.
44   virtual void DeclRead(serialization::DeclID ID, const Decl *D) { }
45   /// \brief A selector was read from the AST file.
46   virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { }
47   /// \brief A macro definition was read from the AST file.
48   virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, 
49                                    MacroDefinition *MD) { }
50 };
51
52 }
53
54 #endif