Make Argument::print more resilient to non-verifiable IR

llvm-svn: 14801
This commit is contained in:
Chris Lattner 2004-07-13 23:14:34 +00:00
parent 8c54e58f7c
commit e52ed45890
1 changed files with 2 additions and 1 deletions

View File

@ -1182,7 +1182,8 @@ void Type::print(std::ostream &o) const {
}
void Argument::print(std::ostream &o) const {
WriteAsOperand(o, this, true, true, getParent()->getParent());
WriteAsOperand(o, this, true, true,
getParent() ? getParent()->getParent() : 0);
}
// Value::dump - allow easy printing of Values from the debugger.