mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-02 22:32:08 +00:00
Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a834fe24d5
commit
9e4c681354
@ -439,9 +439,9 @@ void ConstantArray::replaceUsesOfWithOnConstant(Value *From, Value *To,
|
||||
assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!");
|
||||
|
||||
std::vector<Constant*> Values;
|
||||
Values.reserve(getValues().size()); // Build replacement array...
|
||||
for (unsigned i = 0, e = getValues().size(); i != e; ++i) {
|
||||
Constant *Val = cast<Constant>(getValues()[i]);
|
||||
Values.reserve(getNumOperands()); // Build replacement array...
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
Constant *Val = getOperand(i);
|
||||
if (Val == From) Val = cast<Constant>(To);
|
||||
Values.push_back(Val);
|
||||
}
|
||||
@ -464,9 +464,9 @@ void ConstantStruct::replaceUsesOfWithOnConstant(Value *From, Value *To,
|
||||
assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!");
|
||||
|
||||
std::vector<Constant*> Values;
|
||||
Values.reserve(getValues().size());
|
||||
for (unsigned i = 0, e = getValues().size(); i != e; ++i) {
|
||||
Constant *Val = cast<Constant>(getValues()[i]);
|
||||
Values.reserve(getNumOperands()); // Build replacement array...
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
Constant *Val = getOperand(i);
|
||||
if (Val == From) Val = cast<Constant>(To);
|
||||
Values.push_back(Val);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user