2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-05 01:43:49 +00:00
|
|
|
|
|
|
|
|
2001-07-24 17:14:13 +00:00
|
|
|
#include "llvm/Analysis/LiveVar/ValueSet.h"
|
2002-04-28 19:20:10 +00:00
|
|
|
#include "llvm/Value.h"
|
2002-01-20 22:54:45 +00:00
|
|
|
#include <iostream>
|
2001-07-24 17:14:13 +00:00
|
|
|
|
2002-02-24 23:01:21 +00:00
|
|
|
std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value
|
2002-06-25 16:12:52 +00:00
|
|
|
const Value &v = V.V;
|
|
|
|
if (v.hasName())
|
|
|
|
return O << (void*)&v << "(" << v.getName() << ") ";
|
2002-04-28 19:20:10 +00:00
|
|
|
else if (isa<Constant>(v))
|
2002-06-25 16:12:52 +00:00
|
|
|
return O << (void*)&v << "(" << v << ") ";
|
2001-08-20 21:12:49 +00:00
|
|
|
else
|
2002-06-25 16:12:52 +00:00
|
|
|
return O << (void*)&v << " ";
|
2001-07-24 17:14:13 +00:00
|
|
|
}
|
|
|
|
|
2002-02-05 02:51:01 +00:00
|
|
|
void printSet(const ValueSet &S) {
|
|
|
|
for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
|
2002-02-05 01:43:49 +00:00
|
|
|
std::cerr << RAV(*I);
|
2001-07-24 17:14:13 +00:00
|
|
|
}
|
2002-02-05 02:51:01 +00:00
|
|
|
|