From: Scott Linder Date: Thu, 10 Dec 2020 21:54:15 +0000 (+0000) Subject: [SmallVector] Copy new docs into Doxygen comment X-Git-Tag: llvmorg-13-init~3724 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10b5eaed917d6f91aa2d416c08c93697bd1d446f;p=platform%2Fupstream%2Fllvm.git [SmallVector] Copy new docs into Doxygen comment Copy the `ProgrammersManual.rst` changes from D92522 to the Doxygen comment for `SmallVector`, to hopefully encourage new uses migrating to the no-explicit-`N` form. Differential Revision: https://reviews.llvm.org/D93069 --- diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index 1b2787b..10b9d4e 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/include/llvm/ADT/SmallVector.h @@ -1012,7 +1012,14 @@ template struct CalculateSmallVectorDefaultInlinedElements { /// 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 (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) around 64 bytes). +/// +/// \warning This does not attempt to be exception safe. /// template ::value>