diff options
author | Nikita Popov <npopov@redhat.com> | 2022-02-15 10:09:48 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-02-15 10:11:01 +0100 |
commit | 093e9489d59eb2204bf86e4deb788abb2a27533b (patch) | |
tree | 190980cb97adfd6b8d61c21f2ac9f7be595623cc /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | a081a0654f35c12ddc2afc072110098404434b6c (diff) | |
download | llvm-093e9489d59eb2204bf86e4deb788abb2a27533b.zip llvm-093e9489d59eb2204bf86e4deb788abb2a27533b.tar.gz llvm-093e9489d59eb2204bf86e4deb788abb2a27533b.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 8 |
1 files changed, 4 insertions, 4 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: |