Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*.
This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57275 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index b226bdf..f72800d 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -478,14 +478,14 @@
 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 {