summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 05:17:37 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 05:17:37 +0000
commitb1d782bec914a893eabc843f1a7e92c16238aa8d (patch)
treef2a43b9e7e33a57f2de982359c50afcae9e6296e /llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
parent76d8c5725f417fdd61295870a3ed41c33724bc22 (diff)
downloadbcm5719-llvm-b1d782bec914a893eabc843f1a7e92c16238aa8d.tar.gz
bcm5719-llvm-b1d782bec914a893eabc843f1a7e92c16238aa8d.zip
eliminate the std::ostream form of WriteAsOperand and update clients.
This also updates dominator related stuff. llvm-svn: 79825
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysisEvaluator.cpp')
-rw-r--r--llvm/lib/Analysis/AliasAnalysisEvaluator.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp b/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
index 942bc4b1ebd..5194e494e62 100644
--- a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
+++ b/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
@@ -81,13 +81,16 @@ X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator", false, true);
FunctionPass *llvm::createAAEvalPass() { return new AAEval(); }
-static void PrintResults(const char *Msg, bool P, const Value *V1, const Value *V2,
- const Module *M) {
+static void PrintResults(const char *Msg, bool P, const Value *V1,
+ const Value *V2, const Module *M) {
if (P) {
- std::stringstream s1, s2;
- WriteAsOperand(s1, V1, true, M);
- WriteAsOperand(s2, V2, true, M);
- std::string o1(s1.str()), o2(s2.str());
+ std::string o1, o2;
+ {
+ raw_string_ostream os1(o1), os2(o2);
+ WriteAsOperand(os1, V1, true, M);
+ WriteAsOperand(os2, V2, true, M);
+ }
+
if (o2 < o1)
std::swap(o1, o2);
errs() << " " << Msg << ":\t"
OpenPOWER on IntegriCloud