mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1711a7c8cf
commit
3755bec950
@ -95,8 +95,6 @@ class MDNode : public MetadataBase, public FoldingSetNode {
|
||||
|
||||
friend class LLVMContextImpl;
|
||||
|
||||
void replaceElement(Value *From, Value *To);
|
||||
|
||||
SmallVector<WeakVH, 4> Node;
|
||||
typedef SmallVectorImpl<WeakVH>::iterator elem_iterator;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user