aboutsummaryrefslogtreecommitdiff
path: root/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
commit791102fb1192ac9483274e54cbc42480c9b1af10 (patch)
tree4729b1da9b9c946fb83bc177dd3d00bffcf85390 /lib/Analysis/AliasAnalysisEvaluator.cpp
parent79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a (diff)
eliminate the std::ostream form of WriteAsOperand and update clients.
This also updates dominator related stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasAnalysisEvaluator.cpp')
-rw-r--r--lib/Analysis/AliasAnalysisEvaluator.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp
index 942bc4b1eb..5194e494e6 100644
--- a/lib/Analysis/AliasAnalysisEvaluator.cpp
+++ b/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"