[cfe-commits] r171772 - in /cfe/trunk/lib/Serialization: ASTReader.cpp ASTWriter.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Jan 7 11:16:24 PST 2013


Author: akirtzidis
Date: Mon Jan  7 13:16:23 2013
New Revision: 171772

URL: http://llvm.org/viewvc/llvm-project?rev=171772&view=rev
Log:
[PCH] (De)serialize the end location of MacroInfo.

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=171772&r1=171771&r2=171772&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Mon Jan  7 13:16:23 2013
@@ -1144,6 +1144,7 @@
       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;

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=171772&r1=171771&r2=171772&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Mon Jan  7 13:16:23 2013
@@ -1853,6 +1853,7 @@
       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());





More information about the cfe-commits mailing list