aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-28 13:45:07 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-28 13:45:07 +0800
commite72ad2cd524ff38f162a23d69da5f78494d337ae (patch)
tree2e590806b0f610e4392f25f6e8cdff57d2f5a929 /backend/lib/CodeGen/MachineOutliner.cpp
parent3b14bd4d5324b5a280c1ee5567b5526b59e60c5b (diff)
downloadrcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.gz
rcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.xz
[CodeGen] Centralize machine instruction erasure
Diffstat (limited to 'backend/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--backend/lib/CodeGen/MachineOutliner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineOutliner.cpp b/backend/lib/CodeGen/MachineOutliner.cpp
index bdc4d2b..a36a740 100644
--- a/backend/lib/CodeGen/MachineOutliner.cpp
+++ b/backend/lib/CodeGen/MachineOutliner.cpp
@@ -473,7 +473,7 @@ buildSequenceGroups(std::vector<InstructionSegment> &Segments,
if (!Inserted)
return std::unexpected(Inserted.error());
for (MachineInstr *Instruction : Candidate.Instructions) {
- auto Removed = Candidate.Block->removeInstruction(*Instruction);
+ auto Removed = Instruction->eraseFromParent();
if (!Removed)
return std::unexpected(Removed.error());
}