<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 23, 2018, at 11:27, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class="">The patch LGTM, but why would someone actually have a SmallVector with N = 0?  Isn’t that a vector?</div></div></div></div></blockquote><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">It's a vector that can be passed as a SmallVectorImpl parameter.  But yeah, mostly misguided.</div></div></div><br class="Apple-interchange-newline"></div></blockquote><br class=""></div><div>There's another explanation given in llvm/include/llvm/ADT/IndexedMap.h:</div><div>```</div>template <typename T, typename ToIndexT = identity<unsigned>><br class="">  class IndexedMap {<br class="">    using IndexT = typename ToIndexT::argument_type;<br class="">    // Prefer SmallVector with zero inline storage over std::vector. IndexedMaps<br class="">    // can grow very large and SmallVector grows more efficiently as long as T<br class="">    // is trivially copyable.<br class="">    using StorageT = SmallVector<T, 0>;<br class=""><br class="">```</body></html>