HomePhabricator

ADT: Save a word in every StringSet entry

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

Details

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