diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-08-04 08:02:59 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-08-04 08:02:59 +0000 |
commit | 9e4c681354ae36bda07c3fc2494574740905dc06 (patch) | |
tree | 3883a11594fbfa3035f294d493820e98de64d214 /lib/VMCore | |
parent | a834fe24d568d7bf431fb35c53bed0b7f8ab6c0c (diff) | |
download | llvm-9e4c681354ae36bda07c3fc2494574740905dc06.tar.gz llvm-9e4c681354ae36bda07c3fc2494574740905dc06.tar.bz2 llvm-9e4c681354ae36bda07c3fc2494574740905dc06.tar.xz |
Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Constants.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 6800bdf68f..f679f23508 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -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); } |