From e2e65911a286b5192deeaa4625412b1b4ffbea6d Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 31 May 2017 21:25:03 +0000 Subject: [PATCH] Try to fix buildbots It seems not all of our bots have a std::vector::erase() taking a const_iterator (even though that seems to be part of C++11) attempt to workaround. llvm-svn: 304349 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 2a2b43b7ce52..590acc01008a 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -352,7 +352,9 @@ void MachineBasicBlock::removeLiveIn(MCPhysReg Reg, LaneBitmask LaneMask) { MachineBasicBlock::livein_iterator MachineBasicBlock::removeLiveIn(MachineBasicBlock::livein_iterator I) { - return LiveIns.erase(I); + // Get non-const version of iterator. + LiveInVector::iterator LI = LiveIns.begin() + (I - LiveIns.begin()); + return LiveIns.erase(LI); } bool MachineBasicBlock::isLiveIn(MCPhysReg Reg, LaneBitmask LaneMask) const {