<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 1, 2020 at 4:41 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div style="overflow-wrap: break-word;"><div><div><blockquote type="cite"><div><div>On Nov 30, 2020, at 6:04 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>> wrote:</div></div></blockquote></div></div></div><blockquote type="cite"><div style="overflow-wrap: break-word;"><div><div><blockquote type="cite"><div><div></div></div></blockquote></div></div></div></blockquote><blockquote type="cite"><br></blockquote><div style="overflow-wrap: break-word;"><div><div><blockquote type="cite"><div><div dir="ltr"><div><div><div>I actually was mildly leaning to the "minimum 0" side, but after writing the above I'm now leaning towards "minimum 1".</div></div></div></div></div></blockquote></div></div></div><div><div style="overflow-wrap: break-word;"><div><div><br></div><div>I'm fine with this as well.</div><div><br></div><div><blockquote type="cite">On 2020 Dec  1, at 14:33, Chris Lattner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><div style="overflow-wrap: break-word;"><div><div><blockquote type="cite"><div></div></blockquote></div></div></div></blockquote></blockquote></div></div></div></div><div><blockquote type="cite"><div style="overflow-wrap: break-word;"><div><div><div>Overall, I’d recommend a path like this:</div></div></div></div></blockquote><br></div><div>This path SGTM.</div><div><br></div><div><blockquote type="cite"><div style="overflow-wrap: break-word;"><div><div><div>1) We decide what to do about the default argument.  I agree with Sean that SmallVector<T> should default to 1 at the minimum, and produce an error or warning of T.  This makes sense given the bias towards a name that implies inline semantics.</div></div></div></div></blockquote><div><br></div><div>As mentioned above, I think minimum 1 makes sense.</div></div></div></blockquote><div><br></div><div>Thanks Duncan. Looks like we have reached consensus.</div><div><br></div><div>I've drafted a patch that adds the default, and added several folks from this thread as reviewers: <a href="https://reviews.llvm.org/D92522">https://reviews.llvm.org/D92522</a></div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><br><blockquote type="cite"><div style="overflow-wrap: break-word;"><div><div><div>2) We decide whether we want to ban std::vector in the LLVM code base by convention.  If so, I think that we should have a *separate* name for the out of line case, e.g. llvm::Vector<T>, which would be a good dual to llvm::SmallVector<T>.  If this is the end point (Duncan seems to think it should be) then we should make this part of the coding standard and move the code base towards it over time.</div></div></div></div></blockquote><div><br></div><div>(Yeah, I don't think we should allow use of std::vector; even though Mehdi discovered libc++ was changed, it'll be super frustrating to track down compile-time regressions that only occur on the non-libc++ bots or something; I don't think the problem goes away until we stop supporting being built with standard libraries without this)</div><br></div></div></blockquote></div></div>