[PATCH] D92522: [SmallVector] Allow SmallVector<T>
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 2 21:17:14 PST 2020
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.
the patch looks good to me, I think the most important thing here is to nail down the programmer manual dox to be airtight :-)
================
Comment at: llvm/docs/ProgrammersManual.rst:1527
+omitting the ``N``). This will automatically choose a reasonable number of
+inlined elements.
+
----------------
I expand on what reasonable means here. I'd say "reasonable for inline allocation on the stack" or something like that, maybe even give the target number of inline bytes so people have a mental model.
================
Comment at: llvm/include/llvm/ADT/SmallVector.h:926
+ static_assert(
+ sizeof(T) <= 256,
+ "You are trying to use a default number of inlined elements for "
----------------
Huh, interesting approach, I agree with the comment, I didn't think about it that way!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92522/new/
https://reviews.llvm.org/D92522
More information about the llvm-commits
mailing list