[PCH] (De)serialize the end location of MacroInfo.

llvm-svn: 171772
This commit is contained in:
Argyrios Kyrtzidis 2013-01-07 19:16:23 +00:00
parent 86f1a935dc
commit 7572be2e44
2 changed files with 2 additions and 0 deletions

View File

@ -1144,6 +1144,7 @@ void ASTReader::ReadMacroRecord(ModuleFile &F, uint64_t Offset,
unsigned NextIndex = 3;
SourceLocation Loc = ReadSourceLocation(F, Record, NextIndex);
MacroInfo *MI = PP.AllocateMacroInfo(Loc);
MI->setDefinitionEndLoc(ReadSourceLocation(F, Record, NextIndex));
// Record this macro.
MacrosLoaded[GlobalID - NUM_PREDEF_MACRO_IDS] = MI;

View File

@ -1853,6 +1853,7 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) {
addMacroRef(MI, Record);
Record.push_back(inferSubmoduleIDFromLocation(MI->getDefinitionLoc()));
AddSourceLocation(MI->getDefinitionLoc(), Record);
AddSourceLocation(MI->getDefinitionEndLoc(), Record);
AddSourceLocation(MI->getUndefLoc(), Record);
Record.push_back(MI->isUsed());
Record.push_back(MI->isPublic());