<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 13, 2010, at 8:39 PM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br>On Apr 13, 2010, at 4:39 PM, Ted Kremenek wrote:<br><br><blockquote type="cite">Author: kremenek<br></blockquote><blockquote type="cite">Date: Tue Apr 13 18:39:09 2010<br></blockquote><blockquote type="cite">New Revision: 101194<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=101194&view=rev">http://llvm.org/viewvc/llvm-project?rev=101194&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">Introduce ASTVector, which is a std::vector-like class that allocates all memory<br></blockquote><blockquote type="cite">using the allocator associated with an ASTContext.  This is largely copy-and-paste<br></blockquote><blockquote type="cite">from SmallVector, and should be refactored one day.<br></blockquote><br>It shouldn't be too hard to make SmallVector use an Allocator, would it?<br></span></blockquote></div><br><div>No; I think this class is evidence of that, since it's largely the same logic.</div><div><br></div><div>I think the trick would be in keeping the allocator argument optional if one could specify a default allocator (e.g., a MallocAllocator) so that existing SmallVector clients wouldn't be forced to change.  I don't think it would be too difficult.</div><div><br></div><div>My main intent of doing 'ASTVector' first was to try the idea out, see that there was no fallout, and then do the refactoring.</div></body></html>