aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-11-30 06:17:12 +0000
committerDouglas Gregor <dgregor@apple.com>2010-11-30 06:17:12 +0000
commitbbc8175c39f85465475c9f96048d8107848e3e6f (patch)
treede63274e17d1e81a8b892dbcb30fb473c558408e
parent89d9980bbc2e4a4ac86673e6ec16fb9f5babb63b (diff)
Add missing file from last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120397 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Serialization/ASTSerializationListener.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/clang/Serialization/ASTSerializationListener.h b/include/clang/Serialization/ASTSerializationListener.h
new file mode 100644
index 0000000000..79f33726b6
--- /dev/null
+++ b/include/clang/Serialization/ASTSerializationListener.h
@@ -0,0 +1,44 @@
+//===- ASTSerializationListener.h - Decl/Type PCH Write Events -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the ASTSerializationListener class, which is notified
+// by the ASTWriter when an entity is serialized.
+//
+//===----------------------------------------------------------------------===//
+#ifndef LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
+#define LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H
+
+#include "llvm/System/DataTypes.h"
+
+namespace clang {
+
+class PreprocessedEntity;
+
+/// \brief Listener object that receives callbacks when certain kinds of
+/// entities are serialized.
+class ASTSerializationListener {
+public:
+ virtual ~ASTSerializationListener();
+
+ /// \brief Callback invoked whenever a preprocessed entity is serialized.
+ ///
+ /// This callback will only occur when the translation unit was created with
+ /// a detailed preprocessing record.
+ ///
+ /// \param Entity The entity that has been serialized.
+ ///
+ /// \param Offset The offset (in bits) of this entity in the resulting
+ /// AST file.
+ virtual void SerializedPreprocessedEntity(PreprocessedEntity *Entity,
+ uint64_t Offset) = 0;
+};
+
+}
+
+#endif