summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CFGPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 04:37:46 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 04:37:46 +0000
commitb25de3ff6051d69db87c12c8892cfa37ce6e7d64 (patch)
treea6d3f90619240ea8767377f971680ca7896975d5 /llvm/lib/Analysis/CFGPrinter.cpp
parent82e57a6b481bc016e85e39f254f3648594ddf8d2 (diff)
downloadbcm5719-llvm-b25de3ff6051d69db87c12c8892cfa37ce6e7d64.tar.gz
bcm5719-llvm-b25de3ff6051d69db87c12c8892cfa37ce6e7d64.zip
eliminate the "Value" printing methods that print to a std::ostream.
This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
Diffstat (limited to 'llvm/lib/Analysis/CFGPrinter.cpp')
-rw-r--r--llvm/lib/Analysis/CFGPrinter.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp
index 73f50d741c6..2364d984f92 100644
--- a/llvm/lib/Analysis/CFGPrinter.cpp
+++ b/llvm/lib/Analysis/CFGPrinter.cpp
@@ -44,19 +44,21 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
if (ShortNames && !Node->getName().empty())
return Node->getNameStr() + ":";
- std::ostringstream Out;
+ std::string Str;
+ raw_string_ostream OS(Str);
+
if (ShortNames) {
- WriteAsOperand(Out, Node, false);
- return Out.str();
+ WriteAsOperand(OS, Node, false);
+ return OS.str();
}
if (Node->getName().empty()) {
- WriteAsOperand(Out, Node, false);
- Out << ":";
+ WriteAsOperand(OS, Node, false);
+ OS << ":";
}
-
- Out << *Node;
- std::string OutStr = Out.str();
+
+ OS << *Node;
+ std::string OutStr = OS.str();
if (OutStr[0] == '\n') OutStr.erase(OutStr.begin());
// Process string output to make it nicer...
OpenPOWER on IntegriCloud