aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineStripDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineStripDebug.cpp')
-rw-r--r--backend/lib/CodeGen/MachineStripDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineStripDebug.cpp b/backend/lib/CodeGen/MachineStripDebug.cpp
index 4699ef0..46d92d1 100644
--- a/backend/lib/CodeGen/MachineStripDebug.cpp
+++ b/backend/lib/CodeGen/MachineStripDebug.cpp
@@ -14,7 +14,7 @@ Expected<bool> stripDebugMachineFunction(MachineFunction &Function) {
for (MachineInstr *Instruction = Block->firstInstruction(); Instruction != nullptr;) {
MachineInstr *Next = Instruction->next();
if (Instruction->isDebugInstr() && Instruction->operandCount() > 1) {
- auto Removed = Block->removeInstruction(*Instruction);
+ auto Removed = Instruction->eraseFromParent();
if (!Removed)
return std::unexpected(Removed.error());
Changed = true;