From 093e9489d59eb2204bf86e4deb788abb2a27533b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 15 Feb 2022 10:09:48 +0100 Subject: [BitcodeReader] Change order of assignValue() arguments (NFC) Other methods in ValueList generally pass Idx first, and it is more convention for assignment methods to have the target on the LHS rather than RHS. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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 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: -- cgit v1.1