Simplified Serialization code for SourceLocation and SourceRange, and
updated it to the recently updated Serialization API.
Changed clients of SourceLocation serialization to call the
appropriate new methods.
Updated Decl serialization code to put new skeleton serialization code
in place that is much better than the older trait-specialization
approach.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43625 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index b26042e..5972c8c 100644
--- a/AST/StmtSerialization.cpp
+++ b/AST/StmtSerialization.cpp
@@ -80,11 +80,11 @@
// return new DeclStmt(D.ReadOwnedPtr<ScopedDecl>());
case Stmt::NullStmtClass:
- return new NullStmt(D.ReadVal<SourceLocation>());
+ return new NullStmt(SourceLocation::ReadVal(D));
case Stmt::CompoundStmtClass: {
- SourceLocation LBracLoc = D.ReadVal<SourceLocation>();
- SourceLocation RBracLoc = D.ReadVal<SourceLocation>();
+ SourceLocation LBracLoc = SourceLocation::ReadVal(D);
+ SourceLocation RBracLoc = SourceLocation::ReadVal(D);
unsigned NumStmts = D.ReadInt();
llvm::SmallVector<Stmt*, 16> Body;