[cfe-commits] r44078 - /cfe/trunk/Driver/SerializationTest.cpp
Ted Kremenek
kremenek at apple.com
Tue Nov 13 14:56:11 PST 2007
Author: kremenek
Date: Tue Nov 13 16:56:10 2007
New Revision: 44078
URL: http://llvm.org/viewvc/llvm-project?rev=44078&view=rev
Log:
Added pretty-printing of statements during serialization.
Modified:
cfe/trunk/Driver/SerializationTest.cpp
Modified: cfe/trunk/Driver/SerializationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/SerializationTest.cpp?rev=44078&r1=44077&r2=44078&view=diff
==============================================================================
--- cfe/trunk/Driver/SerializationTest.cpp (original)
+++ cfe/trunk/Driver/SerializationTest.cpp Tue Nov 13 16:56:10 2007
@@ -107,8 +107,15 @@
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";
+ llvm::cerr << "Serializing: Decl.\n";
+
+ Printer->HandleTopLevelDecl(*I);
+
Sezr.EmitOwnedPtr(*I);
}
More information about the cfe-commits
mailing list