2005-04-22 01:30:14 +02:00
|
|
|
//
|
2004-01-09 19:15:24 +01:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-22 01:30:14 +02:00
|
|
|
//
|
2004-01-09 19:15:24 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FIXME: Eliminate this file.
|
|
|
|
|
|
|
|
#include "llvm/CodeGen/ValueSet.h"
|
|
|
|
#include "llvm/Value.h"
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2005-04-22 01:30:14 +02:00
|
|
|
std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value
|
2004-01-09 19:15:24 +01:00
|
|
|
const Value &v = V.V;
|
|
|
|
if (v.hasName())
|
|
|
|
return O << (void*)&v << "(" << v.getName() << ") ";
|
2004-07-18 02:37:35 +02:00
|
|
|
else if (isa<Constant>(v) && !isa<GlobalValue>(v))
|
2004-01-09 19:15:24 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // End llvm namespace
|