<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 4, 2016, at 11:52 AM, Daniel Berlin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Aug 4, 2016 at 11:41 AM, Abe Skolnik via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/04/2016 01:33 PM, David Majnemer wrote:<br class="">
<br class="">
<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 class="">
</blockquote>
<br class="">
<br class="">
<br class=""></span>
Why not?  Is that because of this thing you also wrote in the same message: "use lists are allocated before the object"?<span class=""><br class="">
<br class=""></span></blockquote><div class=""><br class=""></div><div class="">Among other things.</div><div class=""><br class=""></div><div class="">They are simply not currently built to be relocated.</div><div class="">attempts to do so will likely result in a huge mess.</div><div class=""><br class=""></div><div class="">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 class=""></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 class=""><br class=""><div class="">The fact that SymbolTable implementation is breaking one of its public method does not seem right to me.</div><div class=""><br class=""><div class="">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 class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div></div></body></html>