1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/ADT
Vitaly Buka 54bf43052b Avoid calling std::memcmp with nullptr
Summary:
UBSAN complains that this is undefined behavior.

We can assume that empty substring (N==1) always satisfy conditions. So
std::memcmp will be called only only for N > 1 and Str.size() > 0.

Reviewers: ruiu, zturner

Subscribers: llvm-commits

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

llvm-svn: 286910
2016-11-15 00:01:40 +00:00
..
AllocatorList.h ADT: Fix build after r281182 2016-09-11 22:55:46 +00:00
APFloat.h [APFloat] Make functions that produce APFloaat objects use correct semantics. 2016-11-06 07:38:37 +00:00
APInt.h ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for APInt 2016-10-15 00:22:06 +00:00
APSInt.h ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for APInt 2016-10-15 00:22:06 +00:00
ArrayRef.h Remove LLVM_CONSTEXPR. 2016-10-23 19:39:16 +00:00
BitmaskEnum.h Force a semicolon at the end of the LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() macro. 2016-07-13 23:52:19 +00:00
BitVector.h Fix BitVector move ctor/assignment. 2016-06-16 21:45:13 +00:00
CachedHashString.h [ADT] Don't rely on string literals not being convertible to non-const char* in CachedHashString. 2016-10-21 22:10:23 +00:00
DAGDeltaAlgorithm.h
DeltaAlgorithm.h
DenseMap.h [ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number of inline buckets. 2016-10-24 16:06:53 +00:00
DenseMapInfo.h [ADT] Remove CachedHash<T>. 2016-10-18 17:50:39 +00:00
DenseSet.h Revert "DenseSet: Appease msc18 to define derived constructors explicitly." 2016-10-19 23:04:57 +00:00
DepthFirstIterator.h Remove spurious non-printable character from source file. 2016-10-07 13:46:38 +00:00
edit_distance.h
EpochTracker.h Turn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like 2016-09-30 19:52:27 +00:00
EquivalenceClasses.h
FoldingSet.h Doxygen for FoldingSet::reserve and FoldingSet::capacity 2016-06-03 17:50:14 +00:00
GraphTraits.h [GraphTraits] Replace all NodeType usage with NodeRef 2016-08-22 21:09:30 +00:00
Hashing.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ilist_base.h ADT: Add sentinel tracking and custom tags to ilists 2016-09-11 16:20:53 +00:00
ilist_iterator.h ADT: Remove ilist_iterator::reset(), NFC 2016-09-11 20:47:27 +00:00
ilist_node_base.h ADT: Add sentinel tracking and custom tags to ilists 2016-09-11 16:20:53 +00:00
ilist_node_options.h Turn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like 2016-09-30 19:52:27 +00:00
ilist_node.h [ilist_node] Add a getReverseIterator() method and a unittest for it. 2016-11-02 00:59:58 +00:00
ilist.h ADT: Never allocate nodes in iplist<> and ilist<> 2016-09-11 23:43:43 +00:00
ImmutableList.h
ImmutableMap.h
ImmutableSet.h
IndexedMap.h
IntEqClasses.h
IntervalMap.h [ADT] IntervalMap: fix setStart and setStop 2016-11-03 19:14:46 +00:00
IntrusiveRefCntPtr.h Weaken ThreadSafeRefCountedBase atomics. 2016-07-21 15:06:50 +00:00
iterator_range.h
iterator.h [ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015. 2016-10-10 19:29:37 +00:00
MapVector.h [ADT] Let MapVector handle non-copyable values. 2016-10-10 16:25:59 +00:00
None.h
Optional.h Remove LLVM_CONSTEXPR. 2016-10-23 19:39:16 +00:00
PackedVector.h
PointerEmbeddedInt.h
PointerIntPair.h
PointerSumType.h
PointerUnion.h
PostOrderIterator.h [ADT] Change PostOrderIterator to use NodeRef. NFC. 2016-08-15 21:52:54 +00:00
PriorityQueue.h Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
PriorityWorklist.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
SCCIterator.h [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef 2016-08-01 22:32:20 +00:00
ScopedHashTable.h
ScopeExit.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
Sequence.h Another attempt to fix MSVC by explicitly disabling the conversion 2016-05-13 22:20:43 +00:00
SetOperations.h
SetVector.h Switch SmallSetVector to use DenseSet when it overflows its inline space. 2016-10-21 21:45:01 +00:00
simple_ilist.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
SmallBitVector.h Remove some unneeded headers and replace some headers with forward class declarations (NFC) 2016-04-16 07:51:28 +00:00
SmallPtrSet.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
SmallSet.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
SmallString.h
SmallVector.h ADT: Prefer the LLVM_NODISCARD spelling 2016-10-16 20:42:34 +00:00
SparseBitVector.h ADT: Use std::list in SparseBitVector, NFC 2016-09-03 02:43:42 +00:00
SparseMultiSet.h
SparseSet.h
Statistic.h Statistic: Bring back printing on exit by default 2016-09-27 19:38:55 +00:00
STLExtras.h [Support] Introduce llvm::formatv() function. 2016-11-11 23:57:40 +00:00
StringExtras.h Add llvm::join_items to StringExtras. 2016-09-27 16:37:30 +00:00
StringMap.h Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 15:02:18 +00:00
StringRef.h [Support] Add StringRef::find_lower and contains_lower. 2016-11-12 17:17:12 +00:00
StringSet.h
StringSwitch.h Avoid calling std::memcmp with nullptr 2016-11-15 00:01:40 +00:00
TinyPtrVector.h Add a (size, value) constructor to TinyPtrVector. 2016-05-16 21:57:47 +00:00
Triple.h [RISCV] Recognise riscv32 and riscv64 in triple parsing code 2016-11-01 16:47:54 +00:00
Twine.h
UniqueVector.h
VariadicFunction.h