2005-04-21 23:30:14 +00:00
|
|
|
//
|
2003-10-20 19:43:21 +00: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-21 23:30:14 +00:00
|
|
|
//
|
2003-10-20 19:43:21 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2003-01-14 22:56:37 +00:00
|
|
|
// FIXME: Eliminate this file.
|
2002-02-05 01:43:49 +00:00
|
|
|
|
2003-01-14 22:56:37 +00:00
|
|
|
#include "llvm/CodeGen/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
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2005-04-21 23:30:14 +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() << ") ";
|
2004-07-18 00:37:35 +00:00
|
|
|
else if (isa<Constant>(v) && !isa<GlobalValue>(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
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|