[cfe-commits] r129513 - /cfe/trunk/lib/Serialization/ASTReader.cpp

Argyrios Kyrtzidis kyrtzidis at apple.com
Thu Apr 14 13:58:09 PDT 2011


On Apr 14, 2011, at 7:07 AM, Sebastian Redl wrote:

> Author: cornedbee
> Date: Thu Apr 14 09:07:41 2011
> New Revision: 129513
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=129513&view=rev
> Log:
> The ASTReader created by -chain-include used the generated PCH buffers in the wrong order. The effect was that all but the first chain-include files was ignored for subsequent compilations.

Woohoo, that was so lovely and braindead. We can change ASTBuffers to vector/SmallVector now and please could you change test/PCH/chain-cxx.cpp so that it would error if not both -chain-includes are active, e.g. if you only have one -chain-include it should error.

> 
> Modified:
>    cfe/trunk/lib/Serialization/ASTReader.cpp
> 
> Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=129513&r1=129512&r2=129513&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
> +++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Apr 14 09:07:41 2011
> @@ -2463,8 +2463,8 @@
>   }
> 
>   if (!ASTBuffers.empty()) {
> -    F.Buffer.reset(ASTBuffers.front());
> -    ASTBuffers.pop_front();
> +    F.Buffer.reset(ASTBuffers.back());
> +    ASTBuffers.pop_back();
>     assert(F.Buffer && "Passed null buffer");
>   } else {
>     // Open the AST file.
> 
> 
> _______________________________________________
> 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