clang  6.0.0svn
ASTDeserializationListener.h
Go to the documentation of this file.
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_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
16 #define LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
17 
20 
21 namespace clang {
22 
23 class Decl;
24 class ASTReader;
25 class QualType;
26 class MacroDefinitionRecord;
27 class MacroInfo;
28 class Module;
29 class SourceLocation;
30 
32 public:
34 
35  /// \brief The ASTReader was initialized.
36  virtual void ReaderInitialized(ASTReader *Reader) { }
37 
38  /// \brief An identifier was deserialized from the AST file.
40  IdentifierInfo *II) { }
41  /// \brief A macro was read from the AST file.
43  /// \brief A type was deserialized from the AST file. The ID here has the
44  /// qualifier bits already removed, and T is guaranteed to be locally
45  /// unqualified.
46  virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { }
47  /// \brief A decl was deserialized from the AST file.
48  virtual void DeclRead(serialization::DeclID ID, const Decl *D) { }
49  /// \brief A selector was read from the AST file.
51  /// \brief A macro definition was read from the AST file.
53  MacroDefinitionRecord *MD) {}
54  /// \brief A module definition was read from the AST file.
56  /// \brief A module import was read from the AST file.
58  SourceLocation ImportLoc) {}
59 };
60 }
61 
62 #endif
Smart pointer class that efficiently represents Objective-C method names.
A (possibly-)qualified type.
Definition: Type.h:614
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
Definition: ASTBitCodes.h:123
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:81
virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI)
A macro was read from the AST file.
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
Definition: ASTBitCodes.h:63
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
virtual void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II)
An identifier was deserialized from the AST file.
One of these records is kept for each identifier that is lexed.
virtual void ReaderInitialized(ASTReader *Reader)
The ASTReader was initialized.
Record the location of a macro definition.
Describes a module or submodule.
Definition: Module.h:57
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
Definition: ASTBitCodes.h:160
virtual void SelectorRead(serialization::SelectorID iD, Selector Sel)
A selector was read from the AST file.
virtual void DeclRead(serialization::DeclID ID, const Decl *D)
A decl was deserialized from the AST file.
const FunctionProtoType * T
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Encodes a location in the source.
virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod)
A module definition was read from the AST file.
virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, MacroDefinitionRecord *MD)
A macro definition was read from the AST file.
uint32_t MacroID
An ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:129
virtual void TypeRead(serialization::TypeIdx Idx, QualType T)
A type was deserialized from the AST file.
Dataflow Directional Tag Classes.
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:328
Encapsulates the data about a macro definition (e.g.
Definition: MacroInfo.h:34
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
Definition: ASTBitCodes.h:157
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Definition: ASTBitCodes.h:142
virtual void ModuleImportRead(serialization::SubmoduleID ID, SourceLocation ImportLoc)
A module import was read from the AST file.
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:83