Added LLVM project notice to the top of every C++ source file.
[oota-llvm.git] / lib / Target / SparcV9 / LiveVar / ValueSet.cpp
1 // 
2 //                     The LLVM Compiler Infrastructure
3 //
4 // This file was developed by the LLVM research group and is distributed under
5 // the University of Illinois Open Source License. See LICENSE.TXT for details.
6 // 
7 //===----------------------------------------------------------------------===//
8 // FIXME: Eliminate this file.
9
10 #include "llvm/CodeGen/ValueSet.h"
11 #include "llvm/Value.h"
12 #include <iostream>
13
14 std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 
15   const Value &v = V.V;
16   if (v.hasName())
17     return O << (void*)&v << "(" << v.getName() << ") ";
18   else if (isa<Constant>(v))
19     return O << (void*)&v << "(" << v << ") ";
20   else
21     return O << (void*)&v << " ";
22 }
23
24 void printSet(const ValueSet &S) {
25   for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I)
26     std::cerr << RAV(*I);
27 }
28