[PATCH] D80383: Add AST_SIGNATURE record to unhashed control block of PCM files
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 11 06:35:17 PDT 2020
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
More information about the cfe-commits
mailing list