aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-13 05:16:45 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-13 05:16:45 +0000
commita95d3750441ac8ad03e36af8e6e74039c9a3109d (patch)
treeff6594ca38fba0ebad2d5a63583a909bdfb72a9f /lib/Analysis/GRExprEngine.cpp
parent635d04fe2a14fe79ac9b3802b66f6314ca8bc539 (diff)
Patch by Csaba Hruska!
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp18
1 files changed, 13 insertions, 5 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 << ":";