Added pretty-printing of statements during serialization.

llvm-svn: 44078
This commit is contained in:
Ted Kremenek 2007-11-13 22:56:10 +00:00
parent 049059a7db
commit 767e7507c2
1 changed files with 8 additions and 1 deletions

View File

@ -107,8 +107,15 @@ void SerializationTest::Serialize(llvm::sys::Path& Filename) {
Sezr.EnterBlock(DeclBlock);
// Create a printer to "consume" our deserialized ASTS.
ASTConsumer* Printer = CreateASTPrinter();
Janitor<ASTConsumer> PrinterJanitor(Printer);
for (std::list<Decl*>::iterator I=Decls.begin(), E=Decls.end(); I!=E; ++I) {
llvm::cerr << "Serializing: Decl.\n";
Printer->HandleTopLevelDecl(*I);
Sezr.EmitOwnedPtr(*I);
}