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 | 832437255db5bf10bc2275c643273b0d67e29bdf (patch) | |
tree | 70bc928561df1fb1c6587e826b3e0022d7c0ac22 /llvm/lib/Bytecode | |
parent | a6241aed38eaf4805653a3cc5c89c1a13bd0339d (diff) | |
download | bcm5719-llvm-832437255db5bf10bc2275c643273b0d67e29bdf.tar.gz bcm5719-llvm-832437255db5bf10bc2275c643273b0d67e29bdf.zip |
Stop using getValues().
llvm-svn: 15487
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 92811ada5a9..579041991b9 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/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); } |