[PATCH] D158572: [clang][modules] Use relative offsets for input files

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 09:59:20 PDT 2023


benlangmuir added inline comments.


================
Comment at: clang/include/clang/Serialization/ModuleFile.h:249
+  /// Absolute offset of the start of the input-files block.
+  uint64_t InputFilesOffsetBase;
+
----------------
Doesn't `InputFilesCursor` already know where the input files block starts?


================
Comment at: clang/lib/Serialization/ASTReader.cpp:5334
   BitstreamCursor InputFilesCursor;
+  uint64_t InputFilesOffsetBase;
 
----------------
We should initialize this to something - either 0 or maybe ~0 so it will be invalid?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158572/new/

https://reviews.llvm.org/D158572



More information about the cfe-commits mailing list