HomePhabricator

ADT: Save a word in every StringSet entry

Authored by jordan_rose on Oct 10 2019, 1:22 PM.

Description

ADT: Save a word in every StringSet entry

Add a specialization to StringMap (actually StringMapEntry) for a
value type of NoneType (the type of llvm::None), and use it for
StringSet. This'll save us a word from every entry in a StringSet,
used for alignment with the size_t that stores the string length.

I could have gone all the way to some kind of empty base class
optimization, but that seemed like overkill. Someone can consider
adding that in the future, though.

https://reviews.llvm.org/D68586

llvm-svn: 374440

Details

Committed
jordan_roseOct 10 2019, 1:22 PM
Parents
rG2f56266234e5: [ScanDeps] clang-format, 80 cols.
Branches
Unknown
Tags
Unknown