[llvm-commits] [llvm] r79243 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Dan Gohman
gohman at apple.com
Mon Aug 17 08:28:08 PDT 2009
Author: djg
Date: Mon Aug 17 10:28:08 2009
New Revision: 79243
URL: http://llvm.org/viewvc/llvm-project?rev=79243&view=rev
Log:
Fix printing of instructions with null operands.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=79243&r1=79242&r2=79243&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Aug 17 10:28:08 2009
@@ -689,7 +689,7 @@
!I->hasName())
CreateFunctionSlot(I);
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
- if (MDNode *N = dyn_cast<MDNode>(I->getOperand(i)))
+ if (MDNode *N = dyn_cast_or_null<MDNode>(I->getOperand(i)))
CreateMetadataSlot(N);
}
}
More information about the llvm-commits
mailing list