[clang] [llvm] Remove remaining uses of Instruction-constructors that insert before another Instruction (PR #85981)

Orlando Cazalet-Hyams via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 08:54:44 PDT 2024


================
@@ -542,7 +542,8 @@ void InsertPHIStrategy::mutate(BasicBlock &BB, RandomIRBuilder &IB) {
   if (&BB == &BB.getParent()->getEntryBlock())
     return;
   Type *Ty = IB.randomType();
-  PHINode *PHI = PHINode::Create(Ty, llvm::pred_size(&BB), "", &BB.front());
+  PHINode *PHI =
+      PHINode::Create(Ty, llvm::pred_size(&BB), "", BB.getFirstInsertionPt());
----------------
OCHyams wrote:

`BB.begin()` instead of `BB.getFirstInsertionPt()`?

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


More information about the cfe-commits mailing list