mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
No need to map NULL operands of metadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94091 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e40eb09e5e
commit
f42fae1674
@ -39,7 +39,7 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
|
|||||||
const MDNode *MD = dyn_cast<MDNode>(V);
|
const MDNode *MD = dyn_cast<MDNode>(V);
|
||||||
SmallVector<Value*, 4> Elts;
|
SmallVector<Value*, 4> Elts;
|
||||||
for (unsigned i = 0; i != MD->getNumOperands(); i++)
|
for (unsigned i = 0; i != MD->getNumOperands(); i++)
|
||||||
Elts.push_back(MapValue(MD->getOperand(i), VM));
|
Elts.push_back(MD->getOperand(i) ? MapValue(MD->getOperand(i), VM) : NULL);
|
||||||
return VM[V] = MDNode::get(V->getContext(), Elts.data(), Elts.size());
|
return VM[V] = MDNode::get(V->getContext(), Elts.data(), Elts.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user