diff options
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Reader/ValueList.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Reader/ValueList.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index f460bfe..cf8381e 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2454,7 +2454,7 @@ Error BitcodeReader::parseConstants() { SmallVector<int, 16> Mask; ShuffleVectorInst::getShuffleMask(Op2, Mask); Value *V = ConstantExpr::getShuffleVector(Op0, Op1, Mask); - ValueList.assignValue(V, CstNo); + ValueList.assignValue(CstNo, V); } for (auto &DelayedSelector : DelayedSelectors) { Type *OpTy = DelayedSelector.OpTy; @@ -2475,7 +2475,7 @@ Error BitcodeReader::parseConstants() { } Constant *Op0 = ValueList.getConstantFwdRef(Op0Idx, SelectorTy); Value *V = ConstantExpr::getSelect(Op0, Op1, Op2); - ValueList.assignValue(V, CstNo); + ValueList.assignValue(CstNo, V); } if (NextCstNo != ValueList.size()) @@ -3062,7 +3062,7 @@ Error BitcodeReader::parseConstants() { } } - ValueList.assignValue(V, NextCstNo); + ValueList.assignValue(NextCstNo, V); ++NextCstNo; } } @@ -5604,7 +5604,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { // Non-void values get registered in the value table for future use. if (!I->getType()->isVoidTy()) - ValueList.assignValue(I, NextValueNo++); + ValueList.assignValue(NextValueNo++, I); } OutOfRecordLoop: diff --git a/llvm/lib/Bitcode/Reader/ValueList.cpp b/llvm/lib/Bitcode/Reader/ValueList.cpp index 2ed547e..2be1f62 100644 --- a/llvm/lib/Bitcode/Reader/ValueList.cpp +++ b/llvm/lib/Bitcode/Reader/ValueList.cpp @@ -60,7 +60,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantPlaceHolder, Value) } // end namespace llvm -void BitcodeReaderValueList::assignValue(Value *V, unsigned Idx) { +void BitcodeReaderValueList::assignValue(unsigned Idx, Value *V) { if (Idx == size()) { push_back(V); return; diff --git a/llvm/lib/Bitcode/Reader/ValueList.h b/llvm/lib/Bitcode/Reader/ValueList.h index a396170..9723781 100644 --- a/llvm/lib/Bitcode/Reader/ValueList.h +++ b/llvm/lib/Bitcode/Reader/ValueList.h @@ -84,7 +84,7 @@ public: Constant *getConstantFwdRef(unsigned Idx, Type *Ty); Value *getValueFwdRef(unsigned Idx, Type *Ty); - void assignValue(Value *V, unsigned Idx); + void assignValue(unsigned Idx, Value *V); /// Once all constants are read, this method bulk resolves any forward /// references. |