aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-09 06:15:05 +0000
committerChris Lattner <sabre@nondot.org>2010-05-09 06:15:05 +0000
commit2fbdfcdf3bbf7b941853d38b123930755e837437 (patch)
treea493522433b325c300dd2367078cc1be07299055 /lib/Frontend/PCHReaderStmt.cpp
parent14ab24f01e36d495fce183aa67b41e45cdd54f39 (diff)
pch'ify 'this' and 'throw'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r--lib/Frontend/PCHReaderStmt.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index cce2e262de..c3cc504a1a 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -127,6 +127,8 @@ namespace {
unsigned VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E);
unsigned VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E);
unsigned VisitCXXTypeidExpr(CXXTypeidExpr *E);
+ unsigned VisitCXXThisExpr(CXXThisExpr *E);
+ unsigned VisitCXXThrowExpr(CXXThrowExpr *E);
};
}
@@ -1005,6 +1007,18 @@ unsigned PCHStmtReader::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
return 1;
}
+unsigned PCHStmtReader::VisitCXXThisExpr(CXXThisExpr *E) {
+ VisitExpr(E);
+ E->setLocation(SourceLocation::getFromRawEncoding(Record[Idx++]));
+ E->setImplicit(Record[Idx++]);
+ return 0;
+}
+
+unsigned PCHStmtReader::VisitCXXThrowExpr(CXXThrowExpr *E) {
+ VisitExpr(E);
+ E->setThrowLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+ return 1;
+}
// Within the bitstream, expressions are stored in Reverse Polish
// Notation, with each of the subexpressions preceding the
@@ -1361,6 +1375,12 @@ Stmt *PCHReader::ReadStmt(llvm::BitstreamCursor &Cursor) {
case pch::EXPR_CXX_TYPEID_TYPE:
S = new (Context) CXXTypeidExpr(Empty, false);
break;
+ case pch::EXPR_CXX_THIS:
+ S = new (Context) CXXThisExpr(Empty);
+ break;
+ case pch::EXPR_CXX_THROW:
+ S = new (Context) CXXThrowExpr(Empty);
+ break;
}
// We hit a STMT_STOP, so we're done with this expression.