print out value's by pointer
authorChris Lattner <sabre@nondot.org>
Fri, 28 Sep 2001 00:06:28 +0000 (00:06 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Sep 2001 00:06:28 +0000 (00:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@655 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Assembly/Writer.h

index 76c71a52eb80c494fa0cdf8fce8a9077b8356749..aa207604a22a7c7f8422847da3cbd235c78996b1 100644 (file)
@@ -89,17 +89,17 @@ inline ostream &operator<<(ostream &o, const Type *T) {
   return o << T->getDescription();
 }
 
-inline ostream &operator<<(ostream &o, const Value &I) {
-  switch (I.getValueType()) {
-  case Value::TypeVal:       return o << I.castTypeAsserting();
-  case Value::ConstantVal:   WriteToAssembly((const ConstPoolVal*)&I,o);break;
-  case Value::MethodArgumentVal: return o << I.getType() << " "<< I.getName();
-  case Value::InstructionVal:WriteToAssembly((const Instruction *)&I, o);break;
-  case Value::BasicBlockVal: WriteToAssembly((const BasicBlock  *)&I, o);break;
-  case Value::MethodVal:     WriteToAssembly((const Method      *)&I, o);break;
-  case Value::GlobalVal:     WriteToAssembly((const GlobalVariable*)&I,o);break;
-  case Value::ModuleVal:     WriteToAssembly((const Module      *)&I,o); break;
-  default: return o << "<unknown value type: " << I.getValueType() << ">";
+inline ostream &operator<<(ostream &o, const Value *I) {
+  switch (I->getValueType()) {
+  case Value::TypeVal:       return o << I->castTypeAsserting();
+  case Value::ConstantVal:   WriteToAssembly((const ConstPoolVal*)I,o);break;
+  case Value::MethodArgumentVal: return o << I->getType() << " "<< I->getName();
+  case Value::InstructionVal:WriteToAssembly((const Instruction *)I, o);break;
+  case Value::BasicBlockVal: WriteToAssembly((const BasicBlock  *)I, o);break;
+  case Value::MethodVal:     WriteToAssembly((const Method      *)I, o);break;
+  case Value::GlobalVal:     WriteToAssembly((const GlobalVariable*)I,o);break;
+  case Value::ModuleVal:     WriteToAssembly((const Module      *)I,o); break;
+  default: return o << "<unknown value type: " << I->getValueType() << ">";
   }
   return o;
 }