clang  14.0.0git
ASTDeserializationListener.h
Go to the documentation of this file.
1 //===- ASTDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the ASTDeserializationListener class, which is notified
10 // by the ASTReader whenever a type or declaration is deserialized.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
15 #define LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
16 
19 
20 namespace clang {
21 
22 class Decl;
23 class ASTReader;
24 class QualType;
25 class MacroDefinitionRecord;
26 class MacroInfo;
27 class Module;
28 class SourceLocation;
29 
31 public:
33 
34  /// The ASTReader was initialized.
35  virtual void ReaderInitialized(ASTReader *Reader) { }
36 
37  /// An identifier was deserialized from the AST file.
39  IdentifierInfo *II) { }
40  /// A macro was read from the AST file.
42  /// 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.
45  virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { }
46  /// A decl was deserialized from the AST file.
47  virtual void DeclRead(serialization::DeclID ID, const Decl *D) { }
48  /// A selector was read from the AST file.
50  /// A macro definition was read from the AST file.
52  MacroDefinitionRecord *MD) {}
53  /// A module definition was read from the AST file.
55  /// A module import was read from the AST file.
57  SourceLocation ImportLoc) {}
58 };
59 }
60 
61 #endif
clang::ASTDeserializationListener::MacroRead
virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI)
A macro was read from the AST file.
Definition: ASTDeserializationListener.h:41
clang::serialization::TypeIdx
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:88
clang::ASTDeserializationListener::IdentifierRead
virtual void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II)
An identifier was deserialized from the AST file.
Definition: ASTDeserializationListener.h:38
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::ASTDeserializationListener::ReaderInitialized
virtual void ReaderInitialized(ASTReader *Reader)
The ASTReader was initialized.
Definition: ASTDeserializationListener.h:35
clang::serialization::IdentID
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
Definition: ASTBitCodes.h:134
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:673
clang::MacroInfo
Encapsulates the data about a macro definition (e.g.
Definition: MacroInfo.h:39
clang::serialization::MacroID
uint32_t MacroID
An ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:140
clang::CodeGen::AlignmentSource::Decl
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::serialization::SubmoduleID
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
Definition: ASTBitCodes.h:171
clang::Module
Describes a module or submodule.
Definition: Module.h:96
clang::ASTDeserializationListener::DeclRead
virtual void DeclRead(serialization::DeclID ID, const Decl *D)
A decl was deserialized from the AST file.
Definition: ASTDeserializationListener.h:47
clang::index::SymbolKind::Module
@ Module
IdentifierTable.h
clang::MacroDefinitionRecord
Record the location of a macro definition.
Definition: PreprocessingRecord.h:148
clang::ASTDeserializationListener::MacroDefinitionRead
virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, MacroDefinitionRecord *MD)
A macro definition was read from the AST file.
Definition: ASTDeserializationListener.h:51
clang::ASTDeserializationListener::SelectorRead
virtual void SelectorRead(serialization::SelectorID iD, Selector Sel)
A selector was read from the AST file.
Definition: ASTDeserializationListener.h:49
clang::serialization::PreprocessedEntityID
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
Definition: ASTBitCodes.h:168
ASTBitCodes.h
clang::ASTDeserializationListener::TypeRead
virtual void TypeRead(serialization::TypeIdx Idx, QualType T)
A type was deserialized from the AST file.
Definition: ASTDeserializationListener.h:45
clang::ASTDeserializationListener
Definition: ASTDeserializationListener.h:30
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::ASTDeserializationListener::ModuleRead
virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod)
A module definition was read from the AST file.
Definition: ASTDeserializationListener.h:54
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::ASTReader
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:342
clang::Builtin::ID
ID
Definition: Builtins.h:48
clang
Definition: CalledOnceCheck.h:17
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:748
clang::ASTDeserializationListener::~ASTDeserializationListener
virtual ~ASTDeserializationListener()
Definition: ASTCommon.cpp:23
clang::serialization::DeclID
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
Definition: ASTBitCodes.h:68
clang::serialization::SelectorID
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Definition: ASTBitCodes.h:153
clang::ASTDeserializationListener::ModuleImportRead
virtual void ModuleImportRead(serialization::SubmoduleID ID, SourceLocation ImportLoc)
A module import was read from the AST file.
Definition: ASTDeserializationListener.h:56