llvm-6502/lib/Target/SparcV9/LiveVar/ValueSet.cpp
Chris Lattner bfeec103e1 Simplify and update code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:20:10 +00:00

23 lines
525 B
C++

#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "llvm/Value.h"
#include <iostream>
std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value
const Value *v = V.V;
if (v->hasName())
return O << (void*)v << "(" << v->getName() << ") ";
else if (isa<Constant>(v))
return O << (void*)v << "(" << v << ") ";
else
return O << (void*)v << " ";
}
void printSet(const ValueSet &S) {
for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
std::cerr << RAV(*I);
}