llvm-6502/lib/Analysis/LiveVar/ValueSet.cpp
Chris Lattner 1ddf664f74 Make it compile with GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:01:21 +00:00

23 lines
546 B
C++

#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "llvm/ConstantVals.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 << v << "(" << v->getName() << ") ";
else if (Constant *C = dyn_cast<Constant>(v))
return O << v << "(" << C->getStrValue() << ") ";
else
return O << v << " ";
}
void printSet(const ValueSet &S) {
for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
std::cerr << RAV(*I);
}