diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-12-04 18:29:23 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-12-04 18:29:23 +0000 |
commit | a6bd3f5f5eb1cf79786d75854ad0114b6f42772e (patch) | |
tree | 86b1181d06eb01b029e312d8b8a8ed7ce4576c42 /llvm/lib | |
parent | 19462d681a83ba18048922d2ea81c9620423296f (diff) | |
download | bcm5719-llvm-a6bd3f5f5eb1cf79786d75854ad0114b6f42772e.tar.gz bcm5719-llvm-a6bd3f5f5eb1cf79786d75854ad0114b6f42772e.zip |
Fix crasher when N->getElement(n) is NULL
llvm-svn: 90572
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 1865402a65f..44095ca4e85 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -698,7 +698,7 @@ void SlotTracker::processFunction() { if (MDNode *N = dyn_cast_or_null<MDNode>(I->getOperand(i))) { // Create a metadata slot only if N contains no instructions. for (unsigned n = 0, e = N->getNumElements(); n != e; ++n) - if (isa<Instruction>(N->getElement(n))) + if (N->getElement(n) && isa<Instruction>(N->getElement(n))) continue; CreateMetadataSlot(N); } |