diff options
| author | Jay Foad <jay.foad@gmail.com> | 2011-04-21 19:59:31 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@gmail.com> | 2011-04-21 19:59:31 +0000 |
| commit | 5514afe6b2e7aef761600967d3ebe89295fdf690 (patch) | |
| tree | fa584f2dc1c268de212a9d02a69e3996c9c597d7 /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
| parent | ea324f154b050ba5cb8bc25de77ba185ea81d8d7 (diff) | |
| download | llvm-5514afe6b2e7aef761600967d3ebe89295fdf690.zip llvm-5514afe6b2e7aef761600967d3ebe89295fdf690.tar.gz llvm-5514afe6b2e7aef761600967d3ebe89295fdf690.tar.bz2 | |
PR9214: Convert Metadata API to use ArrayRef.
llvm-svn: 129932
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index f5481d3..a73bf04 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -39,7 +39,7 @@ Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, return VM[V] = const_cast<Value*>(V); // Create a dummy node in case we have a metadata cycle. - MDNode *Dummy = MDNode::getTemporary(V->getContext(), 0, 0); + MDNode *Dummy = MDNode::getTemporary(V->getContext(), ArrayRef<Value*>()); VM[V] = Dummy; // Check all operands to see if any need to be remapped. @@ -54,7 +54,7 @@ Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, Value *Op = MD->getOperand(i); Elts.push_back(Op ? MapValue(Op, VM, Flags) : 0); } - MDNode *NewMD = MDNode::get(V->getContext(), Elts.data(), Elts.size()); + MDNode *NewMD = MDNode::get(V->getContext(), Elts); Dummy->replaceAllUsesWith(NewMD); VM[V] = NewMD; MDNode::deleteTemporary(Dummy); |
