From 46d6a1aeb549a2e4ccd982a1a2cefda541d79c52 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Fri, 20 Sep 2002 00:55:57 +0000 Subject: [PATCH] Add erase() method for a single element. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3849 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineBasicBlock.h | 5 +++-- include/llvm/CodeGen/MachineCodeForBasicBlock.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 51714bc3beb..0f8a158c725 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -58,9 +58,10 @@ public: void insert(iterator I, IT S, IT E) { Insts.insert(I, S, E); } iterator insert(iterator I, MachineInstr *M) { return Insts.insert(I, M); } - // erase - Remove the specified range from the instruction list. This does - // not delete in instructions removed. + // erase - Remove the specified element or range from the instruction list. + // These functions do not delete any instructions removed. // + iterator erase(iterator I) { return Insts.erase(I); } iterator erase(iterator I, iterator E) { return Insts.erase(I, E); } MachineInstr *pop_back() { diff --git a/include/llvm/CodeGen/MachineCodeForBasicBlock.h b/include/llvm/CodeGen/MachineCodeForBasicBlock.h index 51714bc3beb..0f8a158c725 100644 --- a/include/llvm/CodeGen/MachineCodeForBasicBlock.h +++ b/include/llvm/CodeGen/MachineCodeForBasicBlock.h @@ -58,9 +58,10 @@ public: void insert(iterator I, IT S, IT E) { Insts.insert(I, S, E); } iterator insert(iterator I, MachineInstr *M) { return Insts.insert(I, M); } - // erase - Remove the specified range from the instruction list. This does - // not delete in instructions removed. + // erase - Remove the specified element or range from the instruction list. + // These functions do not delete any instructions removed. // + iterator erase(iterator I) { return Insts.erase(I); } iterator erase(iterator I, iterator E) { return Insts.erase(I, E); } MachineInstr *pop_back() {