mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 17:58:22 +00:00
Fix crasher when N->getElement(n) is NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79fc6f44b6
commit
954c80e99d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user