Added serialization/deserialization of NullStmts.

llvm-svn: 43797
This commit is contained in:
Ted Kremenek 2007-11-07 00:40:53 +00:00
parent 80fe8904e1
commit ad1bc400d7
2 changed files with 15 additions and 1 deletions

View File

@ -44,7 +44,10 @@ Stmt* Stmt::Materialize(llvm::Deserializer& D) {
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 @@ IntegerLiteral* IntegerLiteral::directMaterialize(llvm::Deserializer& D) {
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);

View File

@ -167,6 +167,9 @@ public:
// 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 }.