[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 08:06:33 PDT 2024


================
@@ -3136,7 +3136,7 @@ static void LLVMPositionBuilderImpl(IRBuilder<> *Builder, BasicBlock *Block,
                                     Instruction *Instr, bool BeforeDbgRecords) {
   BasicBlock::iterator I = Instr ? Instr->getIterator() : Block->end();
   I.setHeadBit(BeforeDbgRecords);
-  Builder->SetInsertPoint(Block, I);
+  Builder->SetInsertPoint(I);
----------------
nikic wrote:

Maybe assert that BB and Instr are consistent here?

https://github.com/llvm/llvm-project/pull/96497


More information about the cfe-commits mailing list