CodeGen: Avoid dereferencing end() when unconstifying iterators
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 16 Aug 2016 23:34:07 +0000 (23:34 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 16 Aug 2016 23:34:07 +0000 (23:34 +0000)
commitdcbce9c3919ab6919de09f64e83fcf26d6353f0b
treebb05e5f17626e2f088127f15a820789125b2daa6
parent8321ba5437f7e35f37291473fc1bafc53d27c62f
CodeGen: Avoid dereferencing end() when unconstifying iterators

Rather than doing a funny dance that relies on dereferencing end() not
crashing, add some API to MachineInstrBundleIterator to get a non-const
version of the iterator.

llvm-svn: 278870
llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
llvm/lib/CodeGen/MachineScheduler.cpp