[llvm-dev] help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
Abe Skolnik via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 4 11:41:35 PDT 2016
On 08/04/2016 01:33 PM, David Majnemer wrote:
> You should never be copying or moving around Values.
Why not? Is that because of this thing you also wrote in the same message: "use lists are
allocated before the object"?
> An llvm::Value (which GlobalVariable is a subtype of) should exist only in the heap.
Trying to sort a container of such objects doesn`t require me to contradict that advice. The
code I have added only uses "GlobalVariable" via pointers and references, with the possible
exception of the newly-added copy ctor.
Thanks for your reply.
Regards,
Abe
More information about the llvm-dev
mailing list