Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@841 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/LiveVar/ValueSet.cpp b/lib/Analysis/LiveVar/ValueSet.cpp
index 8cfe6fb..c93bc20 100644
--- a/lib/Analysis/LiveVar/ValueSet.cpp
+++ b/lib/Analysis/LiveVar/ValueSet.cpp
@@ -6,12 +6,12 @@
void printValue( const Value *const v) // func to print a Value
{
- if( (*v).hasName() )
- cout << v << "(" << ((*v).getName()) << ") ";
+ if (v->hasName())
+ cerr << v << "(" << ((*v).getName()) << ") ";
else if (v->getValueType() == Value::ConstantVal) // if const
- cout << v << "(" << ((ConstPoolVal *) v)->getStrValue() << ") ";
+ cerr << v << "(" << ((ConstPoolVal *) v)->getStrValue() << ") ";
else
- cout << v << " ";
+ cerr << v << " ";
}