From b1d782bec914a893eabc843f1a7e92c16238aa8d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 05:17:37 +0000 Subject: eliminate the std::ostream form of WriteAsOperand and update clients. This also updates dominator related stuff. llvm-svn: 79825 --- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Analysis/AliasAnalysisEvaluator.cpp') 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" -- cgit v1.2.3