mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
58525185d2
for this class. These tests exercise most of the basic properties, but the API for TinyPtrVector is very strange currently. My plan is to start fleshing out the API to match that of SmallVector, but I wanted a test for what is there first. Sadly, it doesn't look reasonable to just re-use the SmallVector tests, as this container can only ever store pointers, and much of the SmallVector testing is to get construction and destruction right. Just to get this basic test working, I had to add value_type to the interface. While here I found a subtle bug in the combination of 'erase', 'begin', and 'end'. Both 'begin' and 'end' wanted to use a null pointer to indicate the "end" iterator of an empty vector, regardless of whether there is actually a vector allocated or the pointer union is null. Everything else was fine with this except for erase. If you erase the last element of a vector after it has held more than one element, we return the end iterator of the underlying SmallVector which need not be a null pointer. Instead, simply use the pointer, and poniter + size() begin/end definitions in the tiny case, and delegate to the inner vector whenever it is present. llvm-svn: 161024
34 lines
644 B
CMake
34 lines
644 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
Support
|
|
)
|
|
|
|
add_llvm_unittest(ADTTests
|
|
APFloatTest.cpp
|
|
APIntTest.cpp
|
|
BitVectorTest.cpp
|
|
DAGDeltaAlgorithmTest.cpp
|
|
DeltaAlgorithmTest.cpp
|
|
DenseMapTest.cpp
|
|
DenseSetTest.cpp
|
|
FoldingSet.cpp
|
|
HashingTest.cpp
|
|
ilistTest.cpp
|
|
ImmutableSetTest.cpp
|
|
IntEqClassesTest.cpp
|
|
IntervalMapTest.cpp
|
|
IntrusiveRefCntPtrTest.cpp
|
|
PackedVectorTest.cpp
|
|
SCCIteratorTest.cpp
|
|
SmallPtrSetTest.cpp
|
|
SmallStringTest.cpp
|
|
SmallVectorTest.cpp
|
|
SparseBitVectorTest.cpp
|
|
SparseSetTest.cpp
|
|
StringMapTest.cpp
|
|
StringRefTest.cpp
|
|
TinyPtrVectorTest.cpp
|
|
TripleTest.cpp
|
|
TwineTest.cpp
|
|
VariadicFunctionTest.cpp
|
|
)
|