[PATCH] D121934: [llvm][StringMap]Extract createTable and getHashTable functions.
Lu Weining via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 19:44:53 PDT 2022
SixWeining added a comment.
Thanks for adding me. I Just add some little comments since I'm not an expert about this. Maybe others could have a look.
================
Comment at: llvm/lib/Support/StringMap.cpp:86
init(16);
- HTSize = NumBuckets;
}
unsigned FullHashValue = djbHash(Name, 0);
----------------
The `{` and `}` are unnecessary since there is only a single line in `if`.
================
Comment at: llvm/lib/Support/StringMap.cpp:221-222
unsigned NewBucketNo = BucketNo;
// Allocate one extra bucket which will always be non-empty. This allows the
// iterators to stop at end.
+ auto **NewTableArray = createTable(NewSize);
----------------
I'm not sure this comment is necessary since the function `createTable` already has an internal comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121934/new/
https://reviews.llvm.org/D121934
More information about the llvm-commits
mailing list