From: Dan Gohman Date: Mon, 17 Aug 2009 15:28:08 +0000 (+0000) Subject: Fix printing of instructions with null operands. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=48cc73d9c7c8d21e3207232663c96d4a266d64b0;p=oota-llvm.git Fix printing of instructions with null operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 82358e9b89a..94256827f0a 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -689,7 +689,7 @@ void SlotTracker::processFunction() { !I->hasName()) CreateFunctionSlot(I); for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (MDNode *N = dyn_cast(I->getOperand(i))) + if (MDNode *N = dyn_cast_or_null(I->getOperand(i))) CreateMetadataSlot(N); } }