From: Sebastian Redl Date: Thu, 14 Apr 2011 14:07:41 +0000 (+0000) Subject: The ASTReader created by -chain-include used the generated PCH buffers in the wrong... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5655837683843a526da9d5af1eb0edbed8c0bc94;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129513 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 1b0f8c56a0..8e8a1bd2dc 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -2463,8 +2463,8 @@ ASTReader::ASTReadResult ASTReader::ReadASTCore(llvm::StringRef FileName, } 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.