[cfe-commits] r43797 - in /cfe/trunk: AST/StmtSerialization.cpp include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Tue Nov 6 16:40:55 PST 2007
Author: kremenek
Date: Tue Nov 6 18:40:53 2007
New Revision: 43797
URL: http://llvm.org/viewvc/llvm-project?rev=43797&view=rev
Log:
Added serialization/deserialization of NullStmts.
Modified:
cfe/trunk/AST/StmtSerialization.cpp
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=43797&r1=43796&r2=43797&view=diff
==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Tue Nov 6 18:40:53 2007
@@ -44,7 +44,10 @@
return DeclStmt::directMaterialize(D);
case IntegerLiteralClass:
- return IntegerLiteral::directMaterialize(D);
+ return IntegerLiteral::directMaterialize(D);
+
+ case NullStmtClass:
+ return NullStmt::directMaterialize(D);
case ReturnStmtClass:
return ReturnStmt::directMaterialize(D);
@@ -137,6 +140,14 @@
return expr;
}
+void NullStmt::directEmit(llvm::Serializer& S) const {
+ S.Emit(SemiLoc);
+}
+
+NullStmt* NullStmt::directMaterialize(llvm::Deserializer& D) {
+ SourceLocation SemiLoc = SourceLocation::ReadVal(D);
+ return new NullStmt(SemiLoc);
+}
void ReturnStmt::directEmit(llvm::Serializer& S) const {
S.Emit(RetLoc);
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=43797&r1=43796&r2=43797&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Tue Nov 6 18:40:53 2007
@@ -167,6 +167,9 @@
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
+
+ virtual void directEmit(llvm::Serializer& S) const;
+ static NullStmt* directMaterialize(llvm::Deserializer& D);
};
/// CompoundStmt - This represents a group of statements like { stmt stmt }.
More information about the cfe-commits
mailing list