aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineSink.cpp')
-rw-r--r--backend/lib/CodeGen/MachineSink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineSink.cpp b/backend/lib/CodeGen/MachineSink.cpp
index dda2048..f82f3a7 100644
--- a/backend/lib/CodeGen/MachineSink.cpp
+++ b/backend/lib/CodeGen/MachineSink.cpp
@@ -327,7 +327,7 @@ findPostRADestination(MachineInstr &Instruction, const MachineFunction &Function
MachineBasicBlock *Source = Instruction.parent();
if (Source == nullptr || Destination.Block == nullptr || Destination.FirstUse == nullptr)
return makeUnexpected(ErrorCode::InternalError, "machine sink has an invalid move plan");
- auto Removed = Source->removeInstruction(Instruction);
+ auto Removed = Instruction.eraseFromParent();
if (!Removed)
return std::unexpected(Removed.error());
return Destination.Block->insertInstructionBefore(*Destination.FirstUse, Instruction);