diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Metadata.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index a7d69a4..1a6288e 100644 --- a/lib/VMCore/Metadata.cpp +++ b/lib/VMCore/Metadata.cpp @@ -27,19 +27,3 @@ void MDNode::Profile(FoldingSetNodeID &ID) const { for (const_elem_iterator I = elem_begin(), E = elem_end(); I != E; ++I) ID.AddPointer(*I); } - -void MDNode::replaceElement(Value *From, Value *To) { - SmallVector<Value*, 4> Values; - Values.reserve(getNumElements()); // Build replacement array... - for (unsigned i = 0, e = getNumElements(); i != e; ++i) { - Value *Val = getElement(i); - if (Val == From) Val = To; - Values.push_back(Val); - } - - MDNode *Replacement = - getType()->getContext().getMDNode(&Values[0], Values.size()); - assert(Replacement != this && "I didn't contain From!"); - - uncheckedReplaceAllUsesWith(Replacement); -} |