forked from OSchip/llvm-project
Added serialization/deserialization of NullStmts.
llvm-svn: 43797
This commit is contained in:
parent
80fe8904e1
commit
ad1bc400d7
|
@ -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);
|
||||
|
|
|
@ -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 }.
|
||||
|
|
Loading…
Reference in New Issue