forked from OSchip/llvm-project
parent
ee4e7d4f25
commit
a8cdf31aa0
|
@ -46,6 +46,9 @@ Stmt* Stmt::Materialize(llvm::Deserializer& D) {
|
|||
case IntegerLiteralClass:
|
||||
return IntegerLiteral::directMaterialize(D);
|
||||
|
||||
case LabelStmtClass:
|
||||
return LabelStmt::directMaterialize(D);
|
||||
|
||||
case NullStmtClass:
|
||||
return NullStmt::directMaterialize(D);
|
||||
|
||||
|
@ -140,6 +143,19 @@ IntegerLiteral* IntegerLiteral::directMaterialize(llvm::Deserializer& D) {
|
|||
return expr;
|
||||
}
|
||||
|
||||
void LabelStmt::directEmit(llvm::Serializer& S) const {
|
||||
S.EmitPtr(Label);
|
||||
S.Emit(IdentLoc);
|
||||
S.EmitOwnedPtr(SubStmt);
|
||||
}
|
||||
|
||||
LabelStmt* LabelStmt::directMaterialize(llvm::Deserializer& D) {
|
||||
IdentifierInfo* Label = D.ReadPtr<IdentifierInfo>();
|
||||
SourceLocation IdentLoc = SourceLocation::ReadVal(D);
|
||||
Stmt* SubStmt = D.ReadOwnedPtr<Stmt>();
|
||||
return new LabelStmt(IdentLoc,Label,SubStmt);
|
||||
}
|
||||
|
||||
void NullStmt::directEmit(llvm::Serializer& S) const {
|
||||
S.Emit(SemiLoc);
|
||||
}
|
||||
|
|
|
@ -349,6 +349,9 @@ public:
|
|||
// Iterators
|
||||
virtual child_iterator child_begin();
|
||||
virtual child_iterator child_end();
|
||||
|
||||
virtual void directEmit(llvm::Serializer& S) const;
|
||||
static LabelStmt* directMaterialize(llvm::Deserializer& D);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue