diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-18 19:28:37 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-18 19:28:37 +0000 |
commit | b8d29bf2e41daa0800c9922b1eb59f8ac2efe192 (patch) | |
tree | e1ff905ff47a8003f880953e84b0396d89b0b15c /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | 0126132e2f309a03104e8384586f407160446452 (diff) | |
download | llvm-b8d29bf2e41daa0800c9922b1eb59f8ac2efe192.zip llvm-b8d29bf2e41daa0800c9922b1eb59f8ac2efe192.tar.gz llvm-b8d29bf2e41daa0800c9922b1eb59f8ac2efe192.tar.bz2 |
Add an assertion for a likely ilist::splice() contract violation.
The single-element ilist::splice() function supports a noop move:
List.splice(I, List, I);
The corresponding std::list function doesn't allow that, so add a unit
test to document that behavior.
This also means that
List.splice(I, List, F);
is somewhat surprisingly not equivalent to
List.splice(I, List, F, next(F));
This patch adds an assertion to catch the illegal case I == F above.
Alternatively, we could make I == F a legal noop, but that would make
ilist differ even more from std::list.
llvm-svn: 170443
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions