forked from OSchip/llvm-project
[modules] Store the location of the lexical update record in a decl update as
an offset from the current record rather than as an absolute bit number. This gives a minor .pcm file size reduction. llvm-svn: 266269
This commit is contained in:
parent
f11e099052
commit
72e50fe4ac
|
@ -3767,7 +3767,7 @@ void ASTDeclReader::UpdateDecl(Decl *D, ModuleFile &ModuleFile,
|
|||
ReadCXXRecordDefinition(RD, /*Update*/true);
|
||||
|
||||
// Visible update is handled separately.
|
||||
uint64_t LexicalOffset = Record[Idx++];
|
||||
uint64_t LexicalOffset = ReadLocalOffset(Record, Idx);
|
||||
if (!HadRealDefinition && LexicalOffset) {
|
||||
Reader.ReadLexicalDeclContextStorage(ModuleFile, ModuleFile.DeclsCursor,
|
||||
LexicalOffset, RD);
|
||||
|
|
|
@ -4661,8 +4661,7 @@ void ASTWriter::WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord) {
|
|||
auto *RD = cast<CXXRecordDecl>(D);
|
||||
UpdatedDeclContexts.insert(RD->getPrimaryContext());
|
||||
Record.AddCXXDefinitionData(RD);
|
||||
// FIXME: Use AddOffset here.
|
||||
Record.push_back(WriteDeclContextLexicalBlock(
|
||||
Record.AddOffset(WriteDeclContextLexicalBlock(
|
||||
*Context, const_cast<CXXRecordDecl *>(RD)));
|
||||
|
||||
// This state is sometimes updated by template instantiation, when we
|
||||
|
|
Loading…
Reference in New Issue