summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-31 21:25:03 +0000
committerMatthias Braun <matze@braunis.de>2017-05-31 21:25:03 +0000
commite2e65911a286b5192deeaa4625412b1b4ffbea6d (patch)
tree88ae9e0cb9bd732eba31a0b5e955029a067c8c7d /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent89918caaa7fd4f3d82e643d9f4f955d2de8eb254 (diff)
downloadbcm5719-llvm-e2e65911a286b5192deeaa4625412b1b4ffbea6d.tar.gz
bcm5719-llvm-e2e65911a286b5192deeaa4625412b1b4ffbea6d.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 2a2b43b7ce5..590acc01008 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 {
OpenPOWER on IntegriCloud