Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
llvm-svn: 841
diff --git a/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp b/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp
index 638e000..09beb12 100644
--- a/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp
+++ b/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp
@@ -33,9 +33,9 @@
assert(MInst);
if( DEBUG_LV > 1) { // debug msg
- cout << " *Iterating over machine instr ";
+ cerr << " *Iterating over machine instr ";
MInst->dump();
- cout << endl;
+ cerr << endl;
}
// iterate over MI operands to find defs
@@ -79,11 +79,11 @@
assert( PhiArgMap[ ArgVal ] );
if( DEBUG_LV > 1) { // debug msg of level 2
- cout << " - phi operand ";
+ cerr << " - phi operand ";
printValue( ArgVal );
- cout << " came from BB ";
+ cerr << " came from BB ";
printValue( PhiArgMap[ ArgVal ]);
- cout<<endl;
+ cerr<<endl;
}
} // if( IsPhi )
@@ -117,7 +117,7 @@
InSetChanged = true;
if( DEBUG_LV > 1) {
- cout << " +Def: "; printValue( Op ); cout << endl;
+ cerr << " +Def: "; printValue( Op ); cerr << endl;
}
}
@@ -130,7 +130,7 @@
InSetChanged = true;
if( DEBUG_LV > 1) { // debug msg of level 2
- cout << " Use: "; printValue( Op ); cout << endl;
+ cerr << " Use: "; printValue( Op ); cerr << endl;
}
}
@@ -220,15 +220,15 @@
void BBLiveVar::printAllSets() const
{
- cout << " Defs: "; DefSet.printSet(); cout << endl;
- cout << " In: "; InSet.printSet(); cout << endl;
- cout << " Out: "; OutSet.printSet(); cout << endl;
+ cerr << " Defs: "; DefSet.printSet(); cerr << endl;
+ cerr << " In: "; InSet.printSet(); cerr << endl;
+ cerr << " Out: "; OutSet.printSet(); cerr << endl;
}
void BBLiveVar::printInOutSets() const
{
- cout << " In: "; InSet.printSet(); cout << endl;
- cout << " Out: "; OutSet.printSet(); cout << endl;
+ cerr << " In: "; InSet.printSet(); cerr << endl;
+ cerr << " Out: "; OutSet.printSet(); cerr << endl;
}