aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterStmt.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-30 08:49:18 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-30 08:49:18 +0000
commit37bdfe284ad365f753741d1d89c078c148b3f4af (patch)
tree472f4c5dbcf2755983da162fdf8c2c00d32eff1f /lib/Frontend/PCHWriterStmt.cpp
parent0ab5de16a47d64ba7cc8ca2e31b679daeae963fe (diff)
Support ParenListExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterStmt.cpp')
-rw-r--r--lib/Frontend/PCHWriterStmt.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index 5b45cb473f..11b1afd373 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -22,7 +22,7 @@ using namespace clang;
// Statement/expression serialization
//===----------------------------------------------------------------------===//
-namespace {
+namespace clang {
class PCHStmtWriter : public StmtVisitor<PCHStmtWriter, void> {
PCHWriter &Writer;
PCHWriter::RecordData &Record;
@@ -64,6 +64,7 @@ namespace {
void VisitStringLiteral(StringLiteral *E);
void VisitCharacterLiteral(CharacterLiteral *E);
void VisitParenExpr(ParenExpr *E);
+ void VisitParenListExpr(ParenListExpr *E);
void VisitUnaryOperator(UnaryOperator *E);
void VisitOffsetOfExpr(OffsetOfExpr *E);
void VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E);
@@ -418,6 +419,16 @@ void PCHStmtWriter::VisitParenExpr(ParenExpr *E) {
Code = pch::EXPR_PAREN;
}
+void PCHStmtWriter::VisitParenListExpr(ParenListExpr *E) {
+ VisitExpr(E);
+ Record.push_back(E->NumExprs);
+ for (unsigned i=0; i != E->NumExprs; ++i)
+ Writer.AddStmt(E->Exprs[i]);
+ Writer.AddSourceLocation(E->LParenLoc, Record);
+ Writer.AddSourceLocation(E->RParenLoc, Record);
+ Code = pch::EXPR_PAREN_LIST;
+}
+
void PCHStmtWriter::VisitUnaryOperator(UnaryOperator *E) {
VisitExpr(E);
Writer.AddStmt(E->getSubExpr());