Sebastian Redl | 6ab7cd8 | 2010-08-18 23:57:17 +0000 | [diff] [blame] | 1 | //===- ASTDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===// |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 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 | // |
Sebastian Redl | 571db7f | 2010-08-18 23:56:56 +0000 | [diff] [blame] | 10 | // This file defines the ASTDeserializationListener class, which is notified |
Sebastian Redl | c43b54c | 2010-08-18 23:56:43 +0000 | [diff] [blame] | 11 | // by the ASTReader whenever a type or declaration is deserialized. |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame^] | 15 | #ifndef LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H |
| 16 | #define LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 17 | |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 18 | #include "clang/Basic/IdentifierTable.h" |
Sebastian Redl | 05a0760 | 2010-08-18 23:57:26 +0000 | [diff] [blame] | 19 | #include "clang/Serialization/ASTBitCodes.h" |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 20 | |
| 21 | namespace clang { |
| 22 | |
| 23 | class Decl; |
Sebastian Redl | c43b54c | 2010-08-18 23:56:43 +0000 | [diff] [blame] | 24 | class ASTReader; |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 25 | class QualType; |
Douglas Gregor | 77424bc | 2010-10-02 19:29:26 +0000 | [diff] [blame] | 26 | class MacroDefinition; |
Argyrios Kyrtzidis | 9317ab9 | 2013-03-22 21:12:57 +0000 | [diff] [blame] | 27 | class MacroInfo; |
Douglas Gregor | a015cab | 2011-12-02 17:30:13 +0000 | [diff] [blame] | 28 | class Module; |
Douglas Gregor | 77424bc | 2010-10-02 19:29:26 +0000 | [diff] [blame] | 29 | |
Sebastian Redl | 571db7f | 2010-08-18 23:56:56 +0000 | [diff] [blame] | 30 | class ASTDeserializationListener { |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 31 | public: |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 32 | virtual ~ASTDeserializationListener(); |
Argyrios Kyrtzidis | 7b90340 | 2010-10-24 17:26:36 +0000 | [diff] [blame] | 33 | |
| 34 | /// \brief The ASTReader was initialized. |
| 35 | virtual void ReaderInitialized(ASTReader *Reader) { } |
Sebastian Redl | ffaab3e | 2010-07-30 00:29:29 +0000 | [diff] [blame] | 36 | |
Sebastian Redl | 3c7f413 | 2010-08-18 23:57:06 +0000 | [diff] [blame] | 37 | /// \brief An identifier was deserialized from the AST file. |
Sebastian Redl | 8538e8d | 2010-08-18 23:57:32 +0000 | [diff] [blame] | 38 | virtual void IdentifierRead(serialization::IdentID ID, |
Argyrios Kyrtzidis | 336d43a | 2010-10-14 20:14:28 +0000 | [diff] [blame] | 39 | IdentifierInfo *II) { } |
Douglas Gregor | a8235d6 | 2012-10-09 23:05:51 +0000 | [diff] [blame] | 40 | /// \brief A macro was read from the AST file. |
Argyrios Kyrtzidis | 9317ab9 | 2013-03-22 21:12:57 +0000 | [diff] [blame] | 41 | virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI) { } |
Sebastian Redl | 3c7f413 | 2010-08-18 23:57:06 +0000 | [diff] [blame] | 42 | /// \brief A type was deserialized from the AST file. The ID here has the |
| 43 | /// qualifier bits already removed, and T is guaranteed to be locally |
| 44 | /// unqualified. |
Argyrios Kyrtzidis | 336d43a | 2010-10-14 20:14:28 +0000 | [diff] [blame] | 45 | virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { } |
Sebastian Redl | 3c7f413 | 2010-08-18 23:57:06 +0000 | [diff] [blame] | 46 | /// \brief A decl was deserialized from the AST file. |
Argyrios Kyrtzidis | 336d43a | 2010-10-14 20:14:28 +0000 | [diff] [blame] | 47 | virtual void DeclRead(serialization::DeclID ID, const Decl *D) { } |
Sebastian Redl | 3c7f413 | 2010-08-18 23:57:06 +0000 | [diff] [blame] | 48 | /// \brief A selector was read from the AST file. |
Argyrios Kyrtzidis | 336d43a | 2010-10-14 20:14:28 +0000 | [diff] [blame] | 49 | virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { } |
Douglas Gregor | 77424bc | 2010-10-02 19:29:26 +0000 | [diff] [blame] | 50 | /// \brief A macro definition was read from the AST file. |
Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 51 | virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, |
Argyrios Kyrtzidis | 336d43a | 2010-10-14 20:14:28 +0000 | [diff] [blame] | 52 | MacroDefinition *MD) { } |
Douglas Gregor | a015cab | 2011-12-02 17:30:13 +0000 | [diff] [blame] | 53 | /// \brief A module definition was read from the AST file. |
| 54 | virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) { } |
Sebastian Redl | 30c514c | 2010-07-14 23:45:08 +0000 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | } |
| 58 | |
| 59 | #endif |