1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/unittests/ADT
Chandler Carruth 8159ba335a [ADT] Add llvm::unique_function which is like std::function but
supporting move-only closures.

Most of the core optimizations for std::function are here plus
a potentially novel one that detects trivially movable and destroyable
functors and implements those with fewer indirections.

This is especially useful as we start trying to add concurrency
primitives as those often end up with move-only types (futures,
promises, etc) and wanting them to work through lambdas.

As further work, we could add better support for things like const-qualified
operator()s to support more algorithms, and r-value ref qualified operator()s
to model call-once. None of that is here though.

We can also provide our own llvm::function that has some of the optimizations
used in this class, but with copy semantics instead of move semantics.

This is motivated by increasing usage of things like executors and the task
queue where it is useful to embed move-only types like a std::promise within
a type erased function. That isn't possible without this version of a type
erased function.

Differential Revision: https://reviews.llvm.org/D48349

llvm-svn: 336156
2018-07-02 23:57:29 +00:00
..
APFloatTest.cpp APFloat/x87: Fix string conversion for "unnormal" values (pr35860) 2018-05-09 15:13:45 +00:00
APIntTest.cpp [APInt] Add helpers for rounding u/sdivs. 2018-06-25 23:49:20 +00:00
APSIntTest.cpp
ArrayRefTest.cpp Revert "ADT: Move ArrayRef comparison operators into the class" 2018-06-28 12:10:21 +00:00
BitmaskEnumTest.cpp
BitVectorTest.cpp
BreadthFirstIteratorTest.cpp
BumpPtrListTest.cpp
CMakeLists.txt [ADT] Add llvm::unique_function which is like std::function but 2018-07-02 23:57:29 +00:00
DAGDeltaAlgorithmTest.cpp
DeltaAlgorithmTest.cpp
DenseMapTest.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DenseSetTest.cpp
DepthFirstIteratorTest.cpp
EquivalenceClassesTest.cpp
FoldingSet.cpp
FunctionExtrasTest.cpp [ADT] Add llvm::unique_function which is like std::function but 2018-07-02 23:57:29 +00:00
FunctionRefTest.cpp
HashingTest.cpp
IListBaseTest.cpp
IListIteratorTest.cpp
IListNodeBaseTest.cpp
IListNodeTest.cpp
IListSentinelTest.cpp
IListTest.cpp
ImmutableMapTest.cpp
ImmutableSetTest.cpp
IntEqClassesTest.cpp
IntervalMapTest.cpp
IntrusiveRefCntPtrTest.cpp
IteratorTest.cpp [ADT] drop_begin: use adl_begin/adl_end. NFC. 2018-06-27 19:39:03 +00:00
MakeUniqueTest.cpp
MappedIteratorTest.cpp
MapVectorTest.cpp [ADT] Fix MapVector when 'Map::mapped_type != unsigned'. 2018-04-08 08:48:58 +00:00
OptionalTest.cpp
PackedVectorTest.cpp
PointerEmbeddedIntTest.cpp
PointerIntPairTest.cpp
PointerSumTypeTest.cpp
PointerUnionTest.cpp
PostOrderIteratorTest.cpp
PriorityWorklistTest.cpp
RangeAdapterTest.cpp
SCCIteratorTest.cpp
ScopeExitTest.cpp
SequenceTest.cpp
SetVectorTest.cpp
SimpleIListTest.cpp
SmallPtrSetTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
SmallSetTest.cpp Revert r334887, as GCC 4.8 does not have is_trivially_copy_constructible & co 2018-06-16 13:00:33 +00:00
SmallStringTest.cpp
SmallVectorTest.cpp
SparseBitVectorTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
SparseMultiSetTest.cpp
SparseSetTest.cpp
StatisticTest.cpp Fix unused function warning in StatisticTest.cpp 2018-03-08 15:52:45 +00:00
STLExtrasTest.cpp [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
StringExtrasTest.cpp [ADT] Make escaping fn conform to coding guidelines 2018-05-31 17:01:42 +00:00
StringMapTest.cpp [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
StringRefTest.cpp [ADT] Add StringRef::rsplit(StringRef Separator). 2018-06-08 12:42:12 +00:00
StringSwitchTest.cpp [ADT] Simplify and optimize StringSwitch 2018-02-26 18:41:26 +00:00
TestGraph.h
TinyPtrVectorTest.cpp
TripleTest.cpp [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU 2018-03-23 18:45:18 +00:00
TwineTest.cpp
VariadicFunctionTest.cpp