aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-27 18:24:17 +0000
committerChris Lattner <sabre@nondot.org>2009-04-27 18:24:17 +0000
commitc732f5a4ae13a75b5dfa8f640a50f94db2d3092c (patch)
tree04e403a700cbff91503ae0dfedc5613ec4c03686 /include/clang/Frontend
parentea5ce4705df0743093925585d8edc80e0d8fe3ff (diff)
encode the type and decl offsets with 32-bits for entry instead
of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 -> 6.7MB): Before: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 5168252 100.00 DECL_OFFSET 1 952700 100.00 TYPE_OFFSET After: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 2584156 100.00 DECL_OFFSET 1 476380 100.00 TYPE_OFFSET git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/PCHReader.h4
-rw-r--r--include/clang/Frontend/PCHWriter.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h
index fed169354e..07f2bb260f 100644
--- a/include/clang/Frontend/PCHReader.h
+++ b/include/clang/Frontend/PCHReader.h
@@ -116,7 +116,7 @@ private:
/// \brief Offset of each type within the bitstream, indexed by the
/// type ID, or the representation of a Type*.
- const uint64_t *TypeOffsets;
+ const uint32_t *TypeOffsets;
/// \brief Types that have already been loaded from the PCH file.
///
@@ -126,7 +126,7 @@ private:
/// \brief Offset of each declaration within the bitstream, indexed
/// by the declaration ID (-1).
- const uint64_t *DeclOffsets;
+ const uint32_t *DeclOffsets;
/// \brief Declarations that have already been loaded from the PCH file.
///
diff --git a/include/clang/Frontend/PCHWriter.h b/include/clang/Frontend/PCHWriter.h
index 4d1262223e..96c6c79de4 100644
--- a/include/clang/Frontend/PCHWriter.h
+++ b/include/clang/Frontend/PCHWriter.h
@@ -64,7 +64,7 @@ private:
/// \brief Offset of each declaration in the bitstream, indexed by
/// the declaration's ID.
- llvm::SmallVector<uint64_t, 16> DeclOffsets;
+ std::vector<uint32_t> DeclOffsets;
/// \brief Queue containing the declarations that we still need to
/// emit.
@@ -81,7 +81,7 @@ private:
/// \brief Offset of each type in the bitstream, indexed by
/// the type's ID.
- llvm::SmallVector<uint64_t, 16> TypeOffsets;
+ std::vector<uint32_t> TypeOffsets;
/// \brief The type ID that will be assigned to the next new type.
pch::TypeID NextTypeID;