]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/tools/clang/include/clang/Serialization/ASTSerializationListener.h
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / contrib / llvm / tools / clang / include / clang / Serialization / ASTSerializationListener.h
1 //===- ASTSerializationListener.h - Decl/Type PCH Write 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 ASTSerializationListener class, which is notified
11 //  by the ASTWriter when an entity is serialized.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
15 #define LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
16
17 #include "llvm/Support/DataTypes.h"
18
19 namespace clang {
20
21 class PreprocessedEntity;
22   
23 /// \brief Listener object that receives callbacks when certain kinds of 
24 /// entities are serialized.
25 class ASTSerializationListener {
26 public:
27   virtual ~ASTSerializationListener();
28   
29   /// \brief Callback invoked whenever a preprocessed entity is serialized.
30   ///
31   /// This callback will only occur when the translation unit was created with
32   /// a detailed preprocessing record.
33   ///
34   /// \param Entity The entity that has been serialized.
35   ///
36   /// \param Offset The offset (in bits) of this entity in the resulting
37   /// AST file.
38   virtual void SerializedPreprocessedEntity(PreprocessedEntity *Entity,
39                                             uint64_t Offset) = 0;
40 };
41
42 }
43
44 #endif