[clang] [clang][modules] Move `SLocEntry` search into `ASTReader` (PR #66966)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 13:58:23 PDT 2023


================
@@ -288,10 +288,12 @@ class ModuleFile {
   /// for the entry is SLocEntryOffsetsBase + SLocEntryOffsets[i].
   uint64_t SLocEntryOffsetsBase = 0;
 
-  /// Offsets for all of the source location entries in the
-  /// AST file.
+  /// Stream bit offsets for all of the source location entries in the AST file.
   const uint32_t *SLocEntryOffsets = nullptr;
 
+  /// SLocEntry offsets that have been loaded from the AST file.
+  std::vector<SourceLocation::UIntTy> SLocEntryOffsetLoaded;
----------------
benlangmuir wrote:

I don't feel that strongly about 10 MB in a large TU; your suggestion seems reasonable, but could be a follow up.

https://github.com/llvm/llvm-project/pull/66966


More information about the cfe-commits mailing list