aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHBitCodes.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-10 03:52:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-10 03:52:48 +0000
commit14f79002e58556798e86168c63e48d533287eda5 (patch)
treeabf9da0e0bb6aea4cdb6ce2a744d1e018d045dbc /include/clang/Frontend/PCHBitCodes.h
parent52e5602056e4cade24cbcca57767e94e1d430b03 (diff)
PCH serialization/deserialization of the source manager. With this
improvement, source locations read from the PCH file will properly resolve to the source files that were used to build the PCH file itself. Once we have the preprocessor state stored in the PCH file, source locations that refer to macro instantiations that occur in the PCH file should have the appropriate instantiation information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PCHBitCodes.h')
-rw-r--r--include/clang/Frontend/PCHBitCodes.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/include/clang/Frontend/PCHBitCodes.h b/include/clang/Frontend/PCHBitCodes.h
index 8835098361..00bd1cfac2 100644
--- a/include/clang/Frontend/PCHBitCodes.h
+++ b/include/clang/Frontend/PCHBitCodes.h
@@ -31,7 +31,19 @@ namespace clang {
/// \brief The PCH block, which acts as a container around the
/// full PCH block.
PCH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
-
+
+ /// \brief The block containing information about the language
+ /// options used to build this precompiled header.
+ LANGUAGE_OPTIONS_BLOCK_ID,
+
+ /// \brief The block containing information about the source
+ /// manager.
+ SOURCE_MANAGER_BLOCK_ID,
+
+ /// \brief The block containing information about the
+ /// preprocessor.
+ PREPROCESSOR_BLOCK_ID,
+
/// \brief The block containing the definitions of all of the
/// types used within the PCH file.
TYPES_BLOCK_ID,
@@ -55,6 +67,30 @@ namespace clang {
DECL_OFFSETS_BLOCK_ID
};
+ /// \brief Record types used within a source manager block.
+ enum SourceManagerRecordTypes {
+ /// \brief Describes a source location entry (SLocEntry) for a
+ /// file.
+ SM_SLOC_FILE_ENTRY = 1,
+ /// \brief Describes a source location entry (SLocEntry) for a
+ /// buffer.
+ SM_SLOC_BUFFER_ENTRY = 2,
+ /// \brief Describes a blob that contains the data for a buffer
+ /// entry. This kind of record always directly follows a
+ /// SM_SLOC_BUFFER_ENTRY record.
+ SM_SLOC_BUFFER_BLOB = 3,
+ /// \brief Describes a source location entry (SLocEntry) for a
+ /// macro instantiation.
+ SM_SLOC_INSTANTIATION_ENTRY = 4
+ };
+
+ /// \defgroup PCHAST Precompiled header AST constants
+ ///
+ /// The constants in this group describe various components of the
+ /// abstract syntax tree within a precompiled header.
+ ///
+ /// @{
+
/// \brief Predefined type IDs.
///
/// These type IDs correspond to predefined types in the AST
@@ -233,6 +269,8 @@ namespace clang {
enum DeclOffsetCode {
DECL_OFFSET = 1
};
+
+ /// @}
}
} // end namespace clang