mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
IndexedMap: Document why SmallVector<T, 0> is preferable here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231028 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4ffd28ade
commit
0b08b96fdd
@ -30,6 +30,9 @@ namespace llvm {
|
||||
template <typename T, typename ToIndexT = llvm::identity<unsigned> >
|
||||
class IndexedMap {
|
||||
typedef typename ToIndexT::argument_type IndexT;
|
||||
// Prefer SmallVector with zero inline storage over std::vector. IndexedMaps
|
||||
// can grow very large and SmallVector grows more efficiently as long as T
|
||||
// is trivially copyable.
|
||||
typedef SmallVector<T, 0> StorageT;
|
||||
StorageT storage_;
|
||||
T nullVal_;
|
||||
|
Loading…
Reference in New Issue
Block a user