projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79fc6f4
)
Fix crasher when N->getElement(n) is NULL
author
Victor Hernandez
<vhernandez@apple.com>
Fri, 4 Dec 2009 18:29:23 +0000
(18:29 +0000)
committer
Victor Hernandez
<vhernandez@apple.com>
Fri, 4 Dec 2009 18:29:23 +0000
(18:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90572
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index 1865402a65f6d04f4cf9f41631a2f18129dfe3fd..44095ca4e858b962153437485fc916fd926d2c59 100644
(file)
--- a/
lib/VMCore/AsmWriter.cpp
+++ b/
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);
}