aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-28 00:06:28 +0000
committerChris Lattner <sabre@nondot.org>2001-09-28 00:06:28 +0000
commit4a0cd6cadab99a577b47b82caebef6ce4237ea58 (patch)
tree1b7890a918db12ec3db859fe72fe10544b2d8baa
parent6e9ff7ded6db1ad7314bcba64b6af29116e3f48d (diff)
downloadexternal_llvm-4a0cd6cadab99a577b47b82caebef6ce4237ea58.zip
external_llvm-4a0cd6cadab99a577b47b82caebef6ce4237ea58.tar.gz
external_llvm-4a0cd6cadab99a577b47b82caebef6ce4237ea58.tar.bz2
print out value's by pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@655 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Assembly/Writer.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/Assembly/Writer.h b/include/llvm/Assembly/Writer.h
index 76c71a5..aa20760 100644
--- a/include/llvm/Assembly/Writer.h
+++ b/include/llvm/Assembly/Writer.h
@@ -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;
}