From 144d9baf5e5665ab1b0e815402d92ee615034b01 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Jul 2004 23:14:34 +0000 Subject: [PATCH] Make Argument::print more resilient to non-verifiable IR git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14801 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index c60e5eeb0b9..bd6c09e0e51 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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. -- 2.34.1