llvm-6502/unittests
Jakob Stoklund Olesen 7f1d6d688f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 19:28:37 +00:00
..
ADT Add an assertion for a likely ilist::splice() contract violation. 2012-12-18 19:28:37 +00:00
Analysis
Bitcode
ExecutionEngine
Option
Support Fix some integer constant warnings by using a suffix 2012-12-17 22:11:17 +00:00
Transforms
VMCore
CMakeLists.txt
Makefile
Makefile.unittest