[PATCH] D118111: [llvm][support] Replace `std::vector<bool>` use in YAMLTraits
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 10:01:33 PST 2022
dexonsmith accepted this revision.
dexonsmith added a comment.
LGTM, with an alternative inline.
================
Comment at: llvm/lib/Support/YAMLTraits.cpp:301
if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
- BitValuesUsed.insert(BitValuesUsed.begin(), SQ->Entries.size(), false);
+ BitValuesUsed.resize(SQ->Entries.size(), false);
} else {
----------------
I might drop the explicit `false` parameter, since it feels implied to me (and very slightly noisy), but up to you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118111/new/
https://reviews.llvm.org/D118111
More information about the llvm-commits
mailing list