diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-01-05 00:57:49 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-01-05 00:57:49 +0000 |
| commit | e84b32e506536b3e8ef9bc789cabe4193cbece67 (patch) | |
| tree | b56c68b17577be3d977b13a0461fb6dd83b59248 | |
| parent | 3592b2352dd0c0de968139e762e30d15b53263ac (diff) | |
| download | bcm5719-llvm-e84b32e506536b3e8ef9bc789cabe4193cbece67.tar.gz bcm5719-llvm-e84b32e506536b3e8ef9bc789cabe4193cbece67.zip | |
Moved serialization code for ObjcForCollectionStmt to be in alphabetical order
with the rest of the Objective-C serialization code.
llvm-svn: 45609
| -rw-r--r-- | clang/AST/StmtSerialization.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/AST/StmtSerialization.cpp b/clang/AST/StmtSerialization.cpp index aa45c62dd32..adf77655e8c 100644 --- a/clang/AST/StmtSerialization.cpp +++ b/clang/AST/StmtSerialization.cpp @@ -94,9 +94,6 @@ Stmt* Stmt::Create(Deserializer& D) { case ForStmtClass: return ForStmt::CreateImpl(D); - - case ObjcForCollectionStmtClass: - return ObjcForCollectionStmt::CreateImpl(D); case GotoStmtClass: return GotoStmt::CreateImpl(D); @@ -174,6 +171,9 @@ Stmt* Stmt::Create(Deserializer& D) { case ObjCEncodeExprClass: return ObjCEncodeExpr::CreateImpl(D); + case ObjcForCollectionStmtClass: + return ObjcForCollectionStmt::CreateImpl(D); + case ObjCIvarRefExprClass: return ObjCIvarRefExpr::CreateImpl(D); @@ -563,21 +563,6 @@ ForStmt* ForStmt::CreateImpl(Deserializer& D) { return new ForStmt(Init,Cond,Inc,Body,ForLoc); } -void ObjcForCollectionStmt::EmitImpl(Serializer& S) const { - S.Emit(ForLoc); - S.EmitOwnedPtr(getElement()); - S.EmitOwnedPtr(getCollection()); - S.EmitOwnedPtr(getBody()); -} - -ObjcForCollectionStmt* ObjcForCollectionStmt::CreateImpl(Deserializer& D) { - SourceLocation ForLoc = SourceLocation::ReadVal(D); - Stmt* Element = D.ReadOwnedPtr<Stmt>(); - Expr* Collection = D.ReadOwnedPtr<Expr>(); - Stmt* Body = D.ReadOwnedPtr<Stmt>(); - return new ObjcForCollectionStmt(Element,Collection,Body,ForLoc); -} - void GotoStmt::EmitImpl(Serializer& S) const { S.Emit(GotoLoc); S.Emit(LabelLoc); @@ -934,6 +919,21 @@ ObjCEncodeExpr* ObjCEncodeExpr::CreateImpl(Deserializer& D) { return new ObjCEncodeExpr(T,ET,AtLoc,RParenLoc); } +void ObjcForCollectionStmt::EmitImpl(Serializer& S) const { + S.Emit(ForLoc); + S.EmitOwnedPtr(getElement()); + S.EmitOwnedPtr(getCollection()); + S.EmitOwnedPtr(getBody()); +} + +ObjcForCollectionStmt* ObjcForCollectionStmt::CreateImpl(Deserializer& D) { + SourceLocation ForLoc = SourceLocation::ReadVal(D); + Stmt* Element = D.ReadOwnedPtr<Stmt>(); + Expr* Collection = D.ReadOwnedPtr<Expr>(); + Stmt* Body = D.ReadOwnedPtr<Stmt>(); + return new ObjcForCollectionStmt(Element,Collection,Body,ForLoc); +} + void ObjCIvarRefExpr::EmitImpl(Serializer& S) const { S.Emit(Loc); S.Emit(getType()); |

