[cfe-commits] r107087 - in /cfe/trunk: include/clang/Frontend/PCHReader.h include/clang/Frontend/PCHWriter.h lib/Frontend/PCHReader.cpp lib/Frontend/PCHReaderDecl.cpp lib/Frontend/PCHReaderStmt.cpp lib/Frontend/PCHWriter.cpp lib/Frontend/PCHWriterStmt.cpp test/PCH/exprs.c test/PCH/exprs.h

Chris Lattner clattner at apple.com
Mon Jun 28 15:37:44 PDT 2010


Whoa, that's much better!

On Jun 28, 2010, at 3:28 PM, Argyrios Kyrtzidis wrote:

> Author: akirtzidis
> Date: Mon Jun 28 17:28:35 2010
> New Revision: 107087
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=107087&view=rev
> Log:
> Modify the way sub-statements are stored and retrieved from PCH.
> 
> Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index
> each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g.
> 
> x = sizeof(int[1]);
> 
> would crash PCH.
> 
> Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just
> need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and
> PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs.





More information about the cfe-commits mailing list