diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-11-13 22:56:10 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-11-13 22:56:10 +0000 |
commit | e720198a6d237929c74f0c9d02d45e276c20e823 (patch) | |
tree | 28cc2df8de22703f37f4b0c4c2363d31e3392521 /Driver/SerializationTest.cpp | |
parent | 1f85acd5ff54345788b93111197088160fe9f06e (diff) |
Added pretty-printing of statements during serialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/SerializationTest.cpp')
-rw-r--r-- | Driver/SerializationTest.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Driver/SerializationTest.cpp b/Driver/SerializationTest.cpp index 4a7137db6b..075fcba2e0 100644 --- a/Driver/SerializationTest.cpp +++ b/Driver/SerializationTest.cpp @@ -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"; + llvm::cerr << "Serializing: Decl.\n"; + + Printer->HandleTopLevelDecl(*I); + Sezr.EmitOwnedPtr(*I); } |