[PATCH] D65764: Add TinyPtrVector support for general pointer-like things.
Andrew Trick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 11:34:24 PDT 2019
atrick created this revision.
atrick added a reviewer: rsmith.
Herald added subscribers: llvm-commits, kristina, dexonsmith, mcrosier.
Herald added a project: LLVM.
In particular, make TinyPtrVector<PtrIntPair<T *, 1>> work. Remove all
unnecessary assumptions that the element type has a formal "null"
representation. The important property to maintain is that
default-constructed element type has the same internal representation
as the default-constructed PointerUnion (all zero bits).
Remove the incorrect recursive behavior from
PointerUnion::isNull. This was never generally correct because it only
recursed over the first type parameter. With variadic templates it's
completely unnecessary.
Repository:
rL LLVM
https://reviews.llvm.org/D65764
Files:
llvm/include/llvm/ADT/PointerUnion.h
llvm/include/llvm/ADT/TinyPtrVector.h
llvm/unittests/ADT/PointerUnionTest.cpp
llvm/unittests/ADT/TinyPtrVectorTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65764.213418.patch
Type: text/x-patch
Size: 10906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190805/4f9dad34/attachment.bin>
More information about the llvm-commits
mailing list