aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorVasileios Porpodas <vporpodas@google.com>2022-11-28 14:43:11 -0800
committerVasileios Porpodas <vporpodas@google.com>2022-12-12 13:33:05 -0800
commit06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2 (patch)
treebf4f7cf10a99e47d1867a88bb794c13f986b54c3 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent816b5e546c6553afd463f9630b248a17702700c9 (diff)
downloadllvm-06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2.zip
llvm-06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2.tar.gz
llvm-06911ba6ea1e552d3bcaed2728c92a9aa6cbf4d2.tar.bz2
[NFC] Cleanup: Replaces BB->getInstList().insert() with I->insertAt().
This is part of a series of cleanup patches towards making BasicBlock::getInstList() private. Differential Revision: https://reviews.llvm.org/D138877
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index efc8b22..47b2972 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4840,7 +4840,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
if (Temp) {
InstructionList.push_back(Temp);
assert(CurBB && "No current BB?");
- CurBB->getInstList().push_back(Temp);
+ Temp->insertAt(CurBB, CurBB->end());
}
} else {
auto CastOp = (Instruction::CastOps)Opc;
@@ -6088,7 +6088,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
// Before weak cmpxchgs existed, the instruction simply returned the
// value loaded from memory, so bitcode files from that era will be
// expecting the first component of a modern cmpxchg.
- CurBB->getInstList().push_back(I);
+ I->insertAt(CurBB, CurBB->end());
I = ExtractValueInst::Create(I, 0);
ResTypeID = CmpTypeID;
} else {
@@ -6412,7 +6412,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
I->deleteValue();
return error("Operand bundles found with no consumer");
}
- CurBB->getInstList().push_back(I);
+ I->insertAt(CurBB, CurBB->end());
// If this was a terminator instruction, move to the next block.
if (I->isTerminator()) {