Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
[oota-llvm.git] / lib / Target / SparcV9 / LiveVar / ValueSet.cpp
1
2
3
4 #include "llvm/Analysis/LiveVar/ValueSet.h"
5 #include "llvm/Value.h"
6 #include <iostream>
7
8 std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 
9   const Value &v = V.V;
10   if (v.hasName())
11     return O << (void*)&v << "(" << v.getName() << ") ";
12   else if (isa<Constant>(v))
13     return O << (void*)&v << "(" << v << ") ";
14   else
15     return O << (void*)&v << " ";
16 }
17
18 void printSet(const ValueSet &S) {
19   for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
20     std::cerr << RAV(*I);
21 }
22