[cfe-commits] r46529 - /cfe/trunk/AST/StmtSerialization.cpp
Ted Kremenek
kremenek at apple.com
Tue Jan 29 13:21:30 PST 2008
Author: kremenek
Date: Tue Jan 29 15:21:30 2008
New Revision: 46529
URL: http://llvm.org/viewvc/llvm-project?rev=46529&view=rev
Log:
- Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().
- Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt.
- Reordered methods so that the deserialization methods for
ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding
methods of the other AST nodes.
Modified:
cfe/trunk/AST/StmtSerialization.cpp
Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=46529&r1=46528&r2=46529&view=diff
==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Tue Jan 29 15:21:30 2008
@@ -161,6 +161,9 @@
case ObjCAtFinallyStmtClass:
return ObjCAtFinallyStmt::CreateImpl(D);
+
+ case ObjCAtSynchronizedStmtClass:
+ return ObjCAtSynchronizedStmt::CreateImpl(D);
case ObjCAtThrowStmtClass:
return ObjCAtThrowStmt::CreateImpl(D);
@@ -883,6 +886,20 @@
return new ObjCAtFinallyStmt(Loc,AtFinallyStmt);
}
+void ObjCAtSynchronizedStmt::EmitImpl(Serializer& S) const {
+ S.Emit(AtSynchronizedLoc);
+ S.BatchEmitOwnedPtrs(SynchExpr, SynchBody);
+}
+
+ObjCAtSynchronizedStmt* ObjCAtSynchronizedStmt::CreateImpl(Deserializer& D) {
+ SourceLocation L = SourceLocation::ReadVal(D);
+ Expr *syncExpr;
+ Stmt *synchBody;
+ D.BatchReadOwnedPtrs(syncExpr, synchBody);
+ ObjCAtSynchronizedStmt* stmt = new ObjCAtSynchronizedStmt(L,syncExpr,synchBody);
+ return stmt;
+}
+
void ObjCAtThrowStmt::EmitImpl(Serializer& S) const {
S.Emit(AtThrowLoc);
S.EmitOwnedPtr(Throw);
@@ -893,20 +910,6 @@
Stmt* Throw = D.ReadOwnedPtr<Stmt>();
return new ObjCAtThrowStmt(L,Throw);
}
-
-void ObjCAtSynchronizedStmt::EmitImpl(Serializer& S) const {
- S.Emit(AtSynchronizedLoc);
- S.EmitOwnedPtr(SynchExpr);
- S.EmitOwnedPtr(SynchBody);
-}
-
-ObjCAtSynchronizedStmt* ObjCAtSynchronizedStmt::CreateImpl(Deserializer& D) {
- SourceLocation L = SourceLocation::ReadVal(D);
- Expr *syncExpr = D.ReadOwnedPtr<Expr>();
- Stmt *synchBody = D.ReadOwnedPtr<Stmt>();
- ObjCAtSynchronizedStmt* stmt = new ObjCAtSynchronizedStmt(L,syncExpr,synchBody);
- return stmt;
-}
void ObjCAtTryStmt::EmitImpl(Serializer& S) const {
S.Emit(AtTryLoc);
More information about the cfe-commits
mailing list