Simplify and update code a bit

llvm-svn: 2376
This commit is contained in:
Chris Lattner 2002-04-28 19:20:10 +00:00
parent b3d1caf947
commit 06bea32e9e
1 changed files with 5 additions and 5 deletions

View File

@ -2,17 +2,17 @@
#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "llvm/ConstantVals.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 << v << "(" << v->getName() << ") ";
else if (Constant *C = dyn_cast<Constant>(v))
return O << v << "(" << C << ") ";
return O << (void*)v << "(" << v->getName() << ") ";
else if (isa<Constant>(v))
return O << (void*)v << "(" << v << ") ";
else
return O << v << " ";
return O << (void*)v << " ";
}
void printSet(const ValueSet &S) {