[PATCH] D93069: [SmallVector] Copy new docs into Doxygen comment

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 14:20:59 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG10b5eaed917d: [SmallVector] Copy new docs into Doxygen comment (authored by scott.linder).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93069/new/

https://reviews.llvm.org/D93069

Files:
  llvm/include/llvm/ADT/SmallVector.h


Index: llvm/include/llvm/ADT/SmallVector.h
===================================================================
--- llvm/include/llvm/ADT/SmallVector.h
+++ llvm/include/llvm/ADT/SmallVector.h
@@ -1012,7 +1012,14 @@
 /// elements is below that threshold.  This allows normal "small" cases to be
 /// fast without losing generality for large inputs.
 ///
-/// Note that this does not attempt to be exception safe.
+/// \note
+/// In the absence of a well-motivated choice for the number of inlined
+/// elements \p N, it is recommended to use \c SmallVector<T> (that is,
+/// omitting the \p N). This will choose a default number of inlined elements
+/// reasonable for allocation on the stack (for example, trying to keep \c
+/// sizeof(SmallVector<T>) around 64 bytes).
+///
+/// \warning This does not attempt to be exception safe.
 ///
 template <typename T,
           unsigned N = CalculateSmallVectorDefaultInlinedElements<T>::value>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93069.311022.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201210/e3dfdc75/attachment.bin>


More information about the llvm-commits mailing list