diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-08-04 08:44:43 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-08-04 08:44:43 +0000 |
commit | 15876bb28c9c0983279c30a123c13224648574c1 (patch) | |
tree | 71be0cb152de7836179ef3dfedb7ad9869551e5f /lib/Bytecode | |
parent | 868bbf35b079a7f356f6b2fbd9df7e66552bc57e (diff) | |
download | external_llvm-15876bb28c9c0983279c30a123c13224648574c1.zip external_llvm-15876bb28c9c0983279c30a123c13224648574c1.tar.gz external_llvm-15876bb28c9c0983279c30a123c13224648574c1.tar.bz2 |
Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 92811ad..5790419 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -338,7 +338,7 @@ void BytecodeWriter::outputConstant(const Constant *CPV) { const ConstantArray *CPA = cast<ConstantArray>(CPV); assert(!CPA->isString() && "Constant strings should be handled specially!"); - for (unsigned i = 0; i != CPA->getNumOperands(); ++i) { + for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i) { int Slot = Table.getSlot(CPA->getOperand(i)); assert(Slot != -1 && "Constant used but not available!!"); output_vbr((unsigned)Slot); @@ -348,10 +348,9 @@ void BytecodeWriter::outputConstant(const Constant *CPV) { case Type::StructTyID: { const ConstantStruct *CPS = cast<ConstantStruct>(CPV); - const std::vector<Use> &Vals = CPS->getValues(); - for (unsigned i = 0; i < Vals.size(); ++i) { - int Slot = Table.getSlot(Vals[i]); + for (unsigned i = 0, e = CPS->getNumOperands(); i != e; ++i) { + int Slot = Table.getSlot(CPS->getOperand(i)); assert(Slot != -1 && "Constant used but not available!!"); output_vbr((unsigned)Slot); } |