dang added inline comments.

================
Comment at: clang/lib/Serialization/ASTReader.cpp:3706
       unsigned LocalBaseMacroID = Record[1];
-      F.MacroOffsetsBase = Record[2];
+      F.MacroOffsetsBase = Record[2] + F.ASTBlockStartOffset;
       F.BaseMacroID = getTotalNumMacros();
----------------
@dexonsmith the field you asked about is used here and the MacroOffsetsBase is 
used in other places to compute offsets


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:2345
                                        FirstMacroID - NUM_PREDEF_MACRO_IDS,
-                                       MacroOffsetsBase};
+                                       MacroOffsetsBase - ASTBlockStartOffset};
     Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record, bytes(MacroOffsets));
----------------
dexonsmith wrote:
> It looks to me like this field is ignored in the reader. If so we should just 
> strip it. Can you confirm?
No, look at line 3706 of the Reader in the updated version. I added a comment 
on the relevant line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80383



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to