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:
e40eb09
)
No need to map NULL operands of metadata
author
Victor Hernandez
<vhernandez@apple.com>
Thu, 21 Jan 2010 19:26:20 +0000
(19:26 +0000)
committer
Victor Hernandez
<vhernandez@apple.com>
Thu, 21 Jan 2010 19:26:20 +0000
(19:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94091
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/ValueMapper.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/ValueMapper.cpp
b/lib/Transforms/Utils/ValueMapper.cpp
index e3ef79facc73465e851b727fef3621b16162260f..2a79b72ba1dd5abd3c8d869a613c6bfc0d2c215d 100644
(file)
--- a/
lib/Transforms/Utils/ValueMapper.cpp
+++ b/
lib/Transforms/Utils/ValueMapper.cpp
@@
-39,7
+39,7
@@
Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
const MDNode *MD = dyn_cast<MDNode>(V);
SmallVector<Value*, 4> Elts;
for (unsigned i = 0; i != MD->getNumOperands(); i++)
- Elts.push_back(M
apValue(MD->getOperand(i), VM)
);
+ Elts.push_back(M
D->getOperand(i) ? MapValue(MD->getOperand(i), VM) : NULL
);
return VM[V] = MDNode::get(V->getContext(), Elts.data(), Elts.size());
}