aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r--lib/AST/StmtSerialization.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index b226bdf8f9..f72800d8ad 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -478,14 +478,14 @@ ContinueStmt* ContinueStmt::CreateImpl(Deserializer& D, ASTContext& C) {
void DeclStmt::EmitImpl(Serializer& S) const {
S.Emit(StartLoc);
S.Emit(EndLoc);
- S.EmitOwnedPtr(TheDecl);
+ S.Emit(DG);
}
DeclStmt* DeclStmt::CreateImpl(Deserializer& D, ASTContext& C) {
SourceLocation StartLoc = SourceLocation::ReadVal(D);
- SourceLocation EndLoc = SourceLocation::ReadVal(D);
- ScopedDecl* decl = cast<ScopedDecl>(D.ReadOwnedPtr<Decl>(C));
- return new DeclStmt(decl, StartLoc, EndLoc);
+ SourceLocation EndLoc = SourceLocation::ReadVal(D);
+ DeclGroupOwningRef DG;
+ return new DeclStmt(DG.Read(D, C), StartLoc, EndLoc);
}
void DeclRefExpr::EmitImpl(Serializer& S) const {