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/Target/RISCV/RISCVFrameLowering.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/Target/RISCV/RISCVFrameLowering.cpp')
| -rw-r--r-- | backend/lib/Target/RISCV/RISCVFrameLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/lib/Target/RISCV/RISCVFrameLowering.cpp b/backend/lib/Target/RISCV/RISCVFrameLowering.cpp index 8a40bc1..1c9ec62 100644 --- a/backend/lib/Target/RISCV/RISCVFrameLowering.cpp +++ b/backend/lib/Target/RISCV/RISCVFrameLowering.cpp @@ -1714,7 +1714,7 @@ public: if (!Adjusted) return std::unexpected(Adjusted.error()); } - return Block->removeInstruction(Instruction); + return Instruction.eraseFromParent(); } [[nodiscard]] Expected<void> emitPrologue(MachineFunction &Function, @@ -2291,7 +2291,7 @@ public: auto Built = Pending->build(); if (!Built) return std::unexpected(Built.error()); - auto Removed = Block.removeInstruction(Terminator); + auto Removed = Terminator.eraseFromParent(); if (!Removed) return std::unexpected(Removed.error()); } |
