[llvm] [MachineBasicBlock] Fix use after free in SplitCriticalEdge (PR #68786)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 01:52:14 PDT 2023


================
@@ -1097,6 +1097,31 @@ static bool jumpTableHasOtherUses(const MachineFunction &MF,
   return false;
 }
 
+class MBBSplitCriticalEdgeDelegate : public MachineFunction::Delegate {
+private:
+  MachineFunction *MF;
+  SlotIndexes *Indexes;
+
+public:
+  MBBSplitCriticalEdgeDelegate(MachineBasicBlock *MBB,
----------------
jayfoad wrote:

Why does this take MBB instead of MF?

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


More information about the llvm-commits mailing list