Simplify and update code a bit
authorChris Lattner <sabre@nondot.org>
Sun, 28 Apr 2002 19:20:10 +0000 (19:20 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 28 Apr 2002 19:20:10 +0000 (19:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2376 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LiveVar/ValueSet.cpp
lib/Target/SparcV9/LiveVar/ValueSet.cpp

index fb691c2ed33146b2a5a3748122a50260bc3838d4..82fccb7e84e677a73e90748b4b7ebe1bc22172df 100644 (file)
@@ -2,17 +2,17 @@
 
 
 #include "llvm/Analysis/LiveVar/ValueSet.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Value.h"
 #include <iostream>
 
 std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 
   const Value *v = V.V;
   if (v->hasName())
-    return O << v << "(" << v->getName() << ") ";
-  else if (Constant *C = dyn_cast<Constant>(v))
-    return O << v << "(" << C << ") ";
+    return O << (void*)v << "(" << v->getName() << ") ";
+  else if (isa<Constant>(v))
+    return O << (void*)v << "(" << v << ") ";
   else
-    return O <<  << " ";
+    return O << (void*)v << " ";
 }
 
 void printSet(const ValueSet &S) {
index fb691c2ed33146b2a5a3748122a50260bc3838d4..82fccb7e84e677a73e90748b4b7ebe1bc22172df 100644 (file)
@@ -2,17 +2,17 @@
 
 
 #include "llvm/Analysis/LiveVar/ValueSet.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Value.h"
 #include <iostream>
 
 std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value 
   const Value *v = V.V;
   if (v->hasName())
-    return O << v << "(" << v->getName() << ") ";
-  else if (Constant *C = dyn_cast<Constant>(v))
-    return O << v << "(" << C << ") ";
+    return O << (void*)v << "(" << v->getName() << ") ";
+  else if (isa<Constant>(v))
+    return O << (void*)v << "(" << v << ") ";
   else
-    return O <<  << " ";
+    return O << (void*)v << " ";
 }
 
 void printSet(const ValueSet &S) {