]> granicus.if.org Git - clang/commitdiff
[PCH] (De)serialize the end location of MacroInfo.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 7 Jan 2013 19:16:23 +0000 (19:16 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 7 Jan 2013 19:16:23 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171772 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp

index f415573db8083ef4e08b5ac4ce5b6f14ca0fe60d..eca9918a79055e65d214b2fd86c1d627b253a5e2 100644 (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;
index 887876f284278e02c420cff123031c64b3c76acd..ac2409833f37d65e174ce5bdc21c1c69a30bd1a3 100644 (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());