Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:37:05

0001 //===- ASTDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 //  This file defines the ASTDeserializationListener class, which is notified
0010 //  by the ASTReader whenever a type or declaration is deserialized.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
0015 #define LLVM_CLANG_SERIALIZATION_ASTDESERIALIZATIONLISTENER_H
0016 
0017 #include "clang/Basic/IdentifierTable.h"
0018 #include "clang/Serialization/ASTBitCodes.h"
0019 
0020 namespace clang {
0021 
0022 class Decl;
0023 class ASTReader;
0024 class QualType;
0025 class MacroDefinitionRecord;
0026 class MacroInfo;
0027 class Module;
0028 class SourceLocation;
0029 
0030 class ASTDeserializationListener {
0031 public:
0032   virtual ~ASTDeserializationListener();
0033 
0034   /// The ASTReader was initialized.
0035   virtual void ReaderInitialized(ASTReader *Reader) { }
0036 
0037   /// An identifier was deserialized from the AST file.
0038   virtual void IdentifierRead(serialization::IdentifierID ID,
0039                               IdentifierInfo *II) { }
0040   /// A macro was read from the AST file.
0041   virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI) { }
0042   /// A type was deserialized from the AST file. The ID here has the
0043   ///        qualifier bits already removed, and T is guaranteed to be locally
0044   ///        unqualified.
0045   virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { }
0046   /// A decl was deserialized from the AST file.
0047   virtual void DeclRead(GlobalDeclID ID, const Decl *D) {}
0048   /// A predefined decl was built during the serialization.
0049   virtual void PredefinedDeclBuilt(PredefinedDeclIDs ID, const Decl *D) {}
0050   /// A selector was read from the AST file.
0051   virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) {}
0052   /// A macro definition was read from the AST file.
0053   virtual void MacroDefinitionRead(serialization::PreprocessedEntityID,
0054                                    MacroDefinitionRecord *MD) {}
0055   /// A module definition was read from the AST file.
0056   virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) {}
0057   /// A module import was read from the AST file.
0058   virtual void ModuleImportRead(serialization::SubmoduleID ID,
0059                                 SourceLocation ImportLoc) {}
0060 };
0061 }
0062 
0063 #endif