Add an iplist::clearAndLeakNodesUnsafely() function.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 4 Jan 2013 22:35:42 +0000 (22:35 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 4 Jan 2013 22:35:42 +0000 (22:35 +0000)
commit7c5c12bd4d60070c90161df9f6ae078c1f7b1ce5
tree05f4b712a6801534c291d7b61398122f474d2bea
parent73a853f05c913f6127e93cf0df3ba6398bcfc213
Add an iplist::clearAndLeakNodesUnsafely() function.

The iplist::clear() function can be quite expensive because it traverses
the entire list, calling deleteNode() and removeNodeFromList() on each
element. If node destruction and deallocation can be handled some other
way, clearAndLeakNodesUnsafely() can be used to jettison all nodes
without bringing them into cache.

The function name is meant to be ominous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171540 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/ilist.h
unittests/ADT/ilistTest.cpp