LLVM API Documentation
00001 // 00002 // The LLVM Compiler Infrastructure 00003 // 00004 // This file was developed by the LLVM research group and is distributed under 00005 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00006 // 00007 //===----------------------------------------------------------------------===// 00008 // FIXME: Eliminate this file. 00009 00010 #include "llvm/CodeGen/ValueSet.h" 00011 #include "llvm/Value.h" 00012 #include <iostream> 00013 00014 namespace llvm { 00015 00016 std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 00017 const Value &v = V.V; 00018 if (v.hasName()) 00019 return O << (void*)&v << "(" << v.getName() << ") "; 00020 else if (isa<Constant>(v) && !isa<GlobalValue>(v)) 00021 return O << (void*)&v << "(" << v << ") "; 00022 else 00023 return O << (void*)&v << " "; 00024 } 00025 00026 void printSet(const ValueSet &S) { 00027 for (ValueSet::const_iterator I = S.begin(), E = S.end(); I != E; ++I) 00028 std::cerr << RAV(*I); 00029 } 00030 00031 } // End llvm namespace