aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHBitCodes.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-26 00:07:37 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-26 00:07:37 +0000
commit2eafc1b56347f772729e082e6bac824b0ef1b585 (patch)
tree92d68a82e05f571a0e55e132948265ceb2361454 /include/clang/Frontend/PCHBitCodes.h
parent7c32f8e9be486f8f8ec2e75eba36903f7cb1b73a (diff)
Don't read all of the records in the PCH file's preprocessor block,
most of which are ignored. Instead, move the __COUNTER__ value out to a PCH-level record (since it is handled eagerly) and move the header file information into the SourceManager block (which is also, currently, loaded eagerly). This results in another 17% performance improvement in the Cocoa-prefixed "Hello, World" with PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PCHBitCodes.h')
-rw-r--r--include/clang/Frontend/PCHBitCodes.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/clang/Frontend/PCHBitCodes.h b/include/clang/Frontend/PCHBitCodes.h
index 26e2c1744c..f486920316 100644
--- a/include/clang/Frontend/PCHBitCodes.h
+++ b/include/clang/Frontend/PCHBitCodes.h
@@ -169,7 +169,11 @@ namespace clang {
SELECTOR_OFFSETS = 12,
/// \brief Record code for the Objective-C method pool,
- METHOD_POOL = 13
+ METHOD_POOL = 13,
+
+ /// \brief The value of the next __COUNTER__ to dispense.
+ /// [PP_COUNTER_VALUE, Val]
+ PP_COUNTER_VALUE = 14
};
/// \brief Record types used within a source manager block.
@@ -189,7 +193,10 @@ namespace clang {
SM_SLOC_INSTANTIATION_ENTRY = 4,
/// \brief Describes the SourceManager's line table, with
/// information about #line directives.
- SM_LINE_TABLE = 5
+ SM_LINE_TABLE = 5,
+ /// \brief Describes one header file info [isImport, DirInfo, NumIncludes]
+ /// ControllingMacro is optional.
+ SM_HEADER_FILE_INFO = 6
};
/// \brief Record types used within a preprocessor block.
@@ -208,15 +215,7 @@ namespace clang {
/// \brief Describes one token.
/// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
- PP_TOKEN = 3,
-
- /// \brief The value of the next __COUNTER__ to dispense.
- /// [PP_COUNTER_VALUE, Val]
- PP_COUNTER_VALUE = 4,
-
- /// \brief Describes one header file info [isImport, DirInfo, NumIncludes]
- /// ControlloingMacro is optional.
- PP_HEADER_FILE_INFO = 5
+ PP_TOKEN = 3
};
/// \defgroup PCHAST Precompiled header AST constants