diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-08-06 22:17:30 +0000 | 
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-08-06 22:17:30 +0000 | 
| commit | 66db7d66dedb0223fbad1069deea2a5617240cb1 (patch) | |
| tree | 9ba1f83be4c419a26e29a515bc2512df4f314dba /clang/lib | |
| parent | 8a8d6f0a78bf64cf16145e5435b9be4289adcfc2 (diff) | |
| download | bcm5719-llvm-66db7d66dedb0223fbad1069deea2a5617240cb1.tar.gz bcm5719-llvm-66db7d66dedb0223fbad1069deea2a5617240cb1.zip  | |
Fix serialization of DeclStmt.
llvm-svn: 54428
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/StmtSerialization.cpp | 22 | 
1 files changed, 3 insertions, 19 deletions
diff --git a/clang/lib/AST/StmtSerialization.cpp b/clang/lib/AST/StmtSerialization.cpp index 845f9024b17..03091fe51fb 100644 --- a/clang/lib/AST/StmtSerialization.cpp +++ b/clang/lib/AST/StmtSerialization.cpp @@ -472,31 +472,15 @@ ContinueStmt* ContinueStmt::CreateImpl(Deserializer& D, ASTContext& C) {  void DeclStmt::EmitImpl(Serializer& S) const {    S.Emit(StartLoc);    S.Emit(EndLoc); - -  // FIXME: Clean up ownership of the Decl. -  const ScopedDecl* d = getDecl(); -   -  if (!S.isRegistered(d)) { -    S.EmitBool(true); -    S.EmitOwnedPtr(d); -  } -  else { -    S.EmitBool(false); -    S.EmitPtr(d); -  } +  S.EmitOwnedPtr(getDecl());  }  DeclStmt* DeclStmt::CreateImpl(Deserializer& D, ASTContext& C) {    SourceLocation StartLoc = SourceLocation::ReadVal(D); -  SourceLocation EndLoc = SourceLocation::ReadVal(D); -   -  bool OwnsDecl = D.ReadBool();   -  ScopedDecl* decl = cast<ScopedDecl>(OwnsDecl ? D.ReadOwnedPtr<Decl>(C) -                                               : D.ReadPtr<Decl>()); -   +  SourceLocation EndLoc = SourceLocation::ReadVal(D);   +  ScopedDecl* decl = cast<ScopedDecl>(D.ReadOwnedPtr<Decl>(C));      return new DeclStmt(decl, StartLoc, EndLoc);  } -      void DeclRefExpr::EmitImpl(Serializer& S) const {    S.Emit(Loc);  | 

