diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-28 13:45:07 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-28 13:45:07 +0800 |
| commit | e72ad2cd524ff38f162a23d69da5f78494d337ae (patch) | |
| tree | 2e590806b0f610e4392f25f6e8cdff57d2f5a929 /backend/lib/CodeGen/MachineCFGUpdater.cpp | |
| parent | 3b14bd4d5324b5a280c1ee5567b5526b59e60c5b (diff) | |
| download | rcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.gz rcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.xz | |
[CodeGen] Centralize machine instruction erasure
Diffstat (limited to 'backend/lib/CodeGen/MachineCFGUpdater.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MachineCFGUpdater.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineCFGUpdater.cpp b/backend/lib/CodeGen/MachineCFGUpdater.cpp index 4aacdf5..050071e 100644 --- a/backend/lib/CodeGen/MachineCFGUpdater.cpp +++ b/backend/lib/CodeGen/MachineCFGUpdater.cpp @@ -489,7 +489,7 @@ Expected<MachineBasicBlock *> MachineCFGUpdater::splitBlock(MachineBasicBlock &B MachineInstr *Instruction = &SplitBefore; while (Instruction != nullptr) { MachineInstr *Next = Instruction->next(); - auto Removed = Block.removeInstruction(*Instruction); + auto Removed = Instruction->eraseFromParent(); if (!Removed) return std::unexpected(Removed.error()); auto Appended = NewBlock->appendInstruction(*Instruction); |
