mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
print out value's by pointer
llvm-svn: 655
This commit is contained in:
parent
62dea18f11
commit
48f0041088
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user