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

David Blaikie dblaikie at gmail.com
Mon Jan 7 11:23:01 PST 2013


On Mon, Jan 7, 2013 at 11:16 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> 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.

Test case?

>
> 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());
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list