forked from OSchip/llvm-project
53f51da09e
DenseMap requires two sentinel values for keys: empty and tombstone values. To avoid undefined behavior, LLVM aligns the two sentinel pointers to alignof(T). This requires T to be complete, which is needlessly restrictive. Instead, assume that DenseMap pointer keys have a maximum alignment of 4096, and use the same sentinel values for all pointer keys. The new sentinels are: empty: static_cast<uintptr_t>(-1) << 12 tombstone: static_cast<uintptr_t>(-2) << 12 These correspond to the addresses of -4096 and -8192. Hopefully, such a key is never inserted into a DenseMap. I encountered this while looking at making clang's SourceManager not require FileManager.h, but it has several maps keyed on classes defined in FileManager.h. FileManager depends on various LLVM FS headers, which cumulatively take ~200ms to parse, and are generally not needed. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D75301 |
||
---|---|---|
.. | ||
APFloatTest.cpp | ||
APIntTest.cpp | ||
APSIntTest.cpp | ||
AnyTest.cpp | ||
ArrayRefTest.cpp | ||
BitVectorTest.cpp | ||
BitmaskEnumTest.cpp | ||
BreadthFirstIteratorTest.cpp | ||
BumpPtrListTest.cpp | ||
CMakeLists.txt | ||
CoalescingBitVectorTest.cpp | ||
DAGDeltaAlgorithmTest.cpp | ||
DeltaAlgorithmTest.cpp | ||
DenseMapTest.cpp | ||
DenseSetTest.cpp | ||
DepthFirstIteratorTest.cpp | ||
DirectedGraphTest.cpp | ||
EnumeratedArrayTest.cpp | ||
EquivalenceClassesTest.cpp | ||
FallibleIteratorTest.cpp | ||
FloatingPointMode.cpp | ||
FoldingSet.cpp | ||
FunctionExtrasTest.cpp | ||
FunctionRefTest.cpp | ||
HashingTest.cpp | ||
IListBaseTest.cpp | ||
IListIteratorTest.cpp | ||
IListNodeBaseTest.cpp | ||
IListNodeTest.cpp | ||
IListSentinelTest.cpp | ||
IListTest.cpp | ||
ImmutableListTest.cpp | ||
ImmutableMapTest.cpp | ||
ImmutableSetTest.cpp | ||
IntEqClassesTest.cpp | ||
IntervalMapTest.cpp | ||
IntrusiveRefCntPtrTest.cpp | ||
IteratorTest.cpp | ||
MapVectorTest.cpp | ||
MappedIteratorTest.cpp | ||
OptionalTest.cpp | ||
PackedVectorTest.cpp | ||
PointerEmbeddedIntTest.cpp | ||
PointerIntPairTest.cpp | ||
PointerSumTypeTest.cpp | ||
PointerUnionTest.cpp | ||
PostOrderIteratorTest.cpp | ||
PriorityWorklistTest.cpp | ||
RangeAdapterTest.cpp | ||
SCCIteratorTest.cpp | ||
STLExtrasTest.cpp | ||
ScopeExitTest.cpp | ||
SequenceTest.cpp | ||
SetVectorTest.cpp | ||
SimpleIListTest.cpp | ||
SmallPtrSetTest.cpp | ||
SmallSetTest.cpp | ||
SmallStringTest.cpp | ||
SmallVectorTest.cpp | ||
SparseBitVectorTest.cpp | ||
SparseMultiSetTest.cpp | ||
SparseSetTest.cpp | ||
StatisticTest.cpp | ||
StringExtrasTest.cpp | ||
StringMapTest.cpp | ||
StringRefTest.cpp | ||
StringSetTest.cpp | ||
StringSwitchTest.cpp | ||
TestGraph.h | ||
TinyPtrVectorTest.cpp | ||
TripleTest.cpp | ||
TwineTest.cpp |