aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-07 23:09:49 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-07 23:09:49 +0000
commit8ffb159441e923322bef6b5dee1aaf24c738d75e (patch)
tree7de360cf9761bbfea545f1ea1f469dc0a9ae7942 /lib/AST/StmtSerialization.cpp
parent2c3352b5d1f5f4546af2f3051a304d84d57c697e (diff)
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
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 {