1 //===- ASTSerializationListener.h - Decl/Type PCH Write Events -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the ASTSerializationListener class, which is notified
11 // by the ASTWriter when an entity is serialized.
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
15 #define LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
17 #include "llvm/Support/DataTypes.h"
21 class PreprocessedEntity;
23 /// \brief Listener object that receives callbacks when certain kinds of
24 /// entities are serialized.
25 class ASTSerializationListener {
27 virtual ~ASTSerializationListener();
29 /// \brief Callback invoked whenever a preprocessed entity is serialized.
31 /// This callback will only occur when the translation unit was created with
32 /// a detailed preprocessing record.
34 /// \param Entity The entity that has been serialized.
36 /// \param Offset The offset (in bits) of this entity in the resulting
38 virtual void SerializedPreprocessedEntity(PreprocessedEntity *Entity,