From 982673396376167dcec6bdff1afacb47d0f1f6a7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 9 May 2010 06:15:05 +0000 Subject: pch'ify 'this' and 'throw' llvm-svn: 103375 --- clang/lib/Frontend/PCHWriterStmt.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'clang/lib/Frontend/PCHWriterStmt.cpp') diff --git a/clang/lib/Frontend/PCHWriterStmt.cpp b/clang/lib/Frontend/PCHWriterStmt.cpp index 1e272c3c66f..e042e77c6b3 100644 --- a/clang/lib/Frontend/PCHWriterStmt.cpp +++ b/clang/lib/Frontend/PCHWriterStmt.cpp @@ -123,6 +123,8 @@ namespace { void VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E); void VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E); void VisitCXXTypeidExpr(CXXTypeidExpr *E); + void VisitCXXThisExpr(CXXThisExpr *E); + void VisitCXXThrowExpr(CXXThrowExpr *E); }; } @@ -924,6 +926,20 @@ void PCHStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) { } } +void PCHStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) { + VisitExpr(E); + Writer.AddSourceLocation(E->getLocation(), Record); + Record.push_back(E->isImplicit()); + Code = pch::EXPR_CXX_THIS; +} + +void PCHStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) { + Writer.AddSourceLocation(E->getThrowLoc(), Record); + Writer.WriteSubStmt(E->getSubExpr()); + Code = pch::EXPR_CXX_THROW; +} + + //===----------------------------------------------------------------------===// // PCHWriter Implementation //===----------------------------------------------------------------------===// -- cgit v1.2.3