diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2008-12-22 19:15:10 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2008-12-22 19:15:10 +0000 |
commit | 54c04d4700beb8c18522363416530ad81a1b4fa1 (patch) | |
tree | 086e597e1bb30fbbeb9e01cb11604569066c85f6 /clang/lib/AST/StmtSerialization.cpp | |
parent | ed4c443193084fae0bef165d67531624cfeee30f (diff) | |
download | bcm5719-llvm-54c04d4700beb8c18522363416530ad81a1b4fa1.tar.gz bcm5719-llvm-54c04d4700beb8c18522363416530ad81a1b4fa1.zip |
Partial AST and Sema support for C++ try-catch.
llvm-svn: 61337
Diffstat (limited to 'clang/lib/AST/StmtSerialization.cpp')
-rw-r--r-- | clang/lib/AST/StmtSerialization.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtSerialization.cpp b/clang/lib/AST/StmtSerialization.cpp index d12ecd0d93a..2d6f7557195 100644 --- a/clang/lib/AST/StmtSerialization.cpp +++ b/clang/lib/AST/StmtSerialization.cpp @@ -242,6 +242,9 @@ Stmt* Stmt::Create(Deserializer& D, ASTContext& C) { case CXXDependentNameExprClass: return CXXDependentNameExpr::CreateImpl(D, C); + + case CXXCatchStmtClass: + return CXXCatchStmt::CreateImpl(D, C); } } @@ -1523,3 +1526,17 @@ CXXDependentNameExpr::CreateImpl(llvm::Deserializer& D, ASTContext& C) { SourceLocation L = SourceLocation::ReadVal(D); return new CXXDependentNameExpr(N, Ty, L); } + +void CXXCatchStmt::EmitImpl(llvm::Serializer& S) const { + S.Emit(CatchLoc); + S.EmitOwnedPtr(ExceptionDecl); + S.EmitOwnedPtr(HandlerBlock); +} + +CXXCatchStmt * +CXXCatchStmt::CreateImpl(llvm::Deserializer& D, ASTContext& C) { + SourceLocation CatchLoc = SourceLocation::ReadVal(D); + Decl *ExDecl = D.ReadOwnedPtr<Decl>(C); + Stmt *HandlerBlock = D.ReadOwnedPtr<Stmt>(C); + return new CXXCatchStmt(CatchLoc, ExDecl, HandlerBlock); +} |