[PATCH] D98477: [ADT] Add IntrusiveVariant

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 21:05:20 PST 2021


scott.linder created this revision.
Herald added subscribers: dexonsmith, mgorny.
scott.linder requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add a compact, restricted version of the C++17 std::variant called
IntrusiveVariant. IntrusiveVariant stores the dynamic tag at
the beginning of every alternative type object, allowing for
more efficient packing in some cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98477

Files:
  llvm/include/llvm/ADT/IntrusiveVariant.h
  llvm/include/llvm/ADT/STLExtras.h
  llvm/unittests/ADT/CMakeLists.txt
  llvm/unittests/ADT/IntrusiveVariantTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98477.330137.patch
Type: text/x-patch
Size: 37255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210312/af08a02d/attachment.bin>


More information about the llvm-commits mailing list