<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 12:45 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><blockquote type="cite"><div>On Aug 4, 2016, at 11:52 AM, Daniel Berlin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 11:41 AM, Abe Skolnik via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 08/04/2016 01:33 PM, David Majnemer wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You should never be copying or moving around Values.<br>
</blockquote>
<br>
<br>
<br></span>
Why not?  Is that because of this thing you also wrote in the same message: "use lists are allocated before the object"?<span><br>
<br></span></blockquote><div><br></div><div>Among other things.</div><div><br></div><div>They are simply not currently built to be relocated.</div><div>attempts to do so will likely result in a huge mess.</div><div><br></div><div>my strong recommendation here would be to stop trying to go down this path, and instead, if you want a sorted list, just put them in a separate container and sort them.</div></div></div></div></div></blockquote><div><br></div></div></div></div>The thing is that a “SymbolTable” is a “iplist” (it inherit from it) and, iplist has a “sort()” method, it is not clear why we can’t sort then?</div></blockquote><div><br></div><div><br></div><div>Sorry, let me be 100% clear: I think it sucks, and you are 100% right.</div><div>I just meant "in terms of path of least resistance" for a user who may not want to go diving into the depths of deep llvm implementation details just to try to get something simple working.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><div>The fact that SymbolTable implementation is breaking one of its public method does not seem right to me.</div><div><br><div>Also, in general, the design assuming any instance of a SymbolTable<GlobalVariabl> is owned by a Module and inspecting the “parent” using magic trick, seems … broken.</div></div></div></div></blockquote><div><br></div><div>Yup.</div><div>But i think this is not the only iplist you will find this in.</div><div> </div></div></div></div>