diff options
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 18 | ||||
-rw-r--r-- | lib/Analysis/GRState.cpp | 8 |
2 files changed, 19 insertions, 7 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 8af5a74f19..d8c0320d66 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -19,6 +19,7 @@ #include "llvm/Support/Streams.h" #include "llvm/ADT/ImmutableList.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/raw_ostream.h" #ifndef NDEBUG #include "llvm/Support/GraphWriter.h" @@ -2194,7 +2195,9 @@ struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> : SourceLocation SLoc = S->getLocStart(); Out << S->getStmtClassName() << ' ' << (void*) S << ' '; - S->printPretty(Out); + llvm::raw_os_ostream OutS(Out); + S->printPretty(OutS); + OutS.flush(); if (SLoc.isFileID()) { Out << "\\lline=" @@ -2237,7 +2240,9 @@ struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> : Out << "\\|Terminator: "; - E.getSrc()->printTerminator(Out); + llvm::raw_os_ostream OutS(Out); + E.getSrc()->printTerminator(OutS); + OutS.flush(); if (SLoc.isFileID()) { Out << "\\lline=" @@ -2251,11 +2256,14 @@ struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> : if (Label) { if (CaseStmt* C = dyn_cast<CaseStmt>(Label)) { Out << "\\lcase "; - C->getLHS()->printPretty(Out); - + llvm::raw_os_ostream OutS(Out); + C->getLHS()->printPretty(OutS); + OutS.flush(); + if (Stmt* RHS = C->getRHS()) { Out << " .. "; - RHS->printPretty(Out); + RHS->printPretty(OutS); + OutS.flush(); } Out << ":"; diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp index 72eeda97b1..4bef72c6c5 100644 --- a/lib/Analysis/GRState.cpp +++ b/lib/Analysis/GRState.cpp @@ -154,7 +154,9 @@ void GRState::print(std::ostream& Out, StoreManager& StoreMgr, else { Out << nl; } Out << " (" << (void*) I.getKey() << ") "; - I.getKey()->printPretty(Out); + llvm::raw_os_ostream OutS(Out); + I.getKey()->printPretty(OutS); + OutS.flush(); Out << " : "; I.getData().print(Out); } @@ -171,7 +173,9 @@ void GRState::print(std::ostream& Out, StoreManager& StoreMgr, else { Out << nl; } Out << " (" << (void*) I.getKey() << ") "; - I.getKey()->printPretty(Out); + llvm::raw_os_ostream OutS(Out); + I.getKey()->printPretty(OutS); + OutS.flush(); Out << " : "; I.getData().print(Out); } |