summaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/LiveVar/ValueSet.cpp
blob: fd8289675a21290ddf8b2e54509a59834513b5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 
//                     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.
// 
//===----------------------------------------------------------------------===//
// FIXME: Eliminate this file.

#include "llvm/CodeGen/ValueSet.h"
#include "llvm/Value.h"
#include <iostream>

namespace llvm {

std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 
  const Value &v = V.V;
  if (v.hasName())
    return O << (void*)&v << "(" << v.getName() << ") ";
  else if (isa<Constant>(v))
    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