[LLVMdev] GlobalValues appear in their own use lists? (original) (raw)

Chandler Carruth chandlerc at google.com
Mon Mar 10 18:23:43 PDT 2014


On Mon, Mar 10, 2014 at 6:16 PM, Sean Callanan <scallanan at apple.com> wrote:

Chris,

this is a patch against top-of-tree. Maybe I wrote something wrong in the patch?

As Chris said, use_iterator walks over the Use objects now, not over the User objects.

Sadly, a Use implicitly converts to the used value. IE, directly back to the Value you called 'use_begin()' on. That is why this assert is firing. =[

If you want to walk the Users which Use an object (rather than the Use nodes that connect them) use the newly minted Value::user_iterator (or a range based for loop over GV.users()). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140310/9b80e682/attachment.html>



More information about the llvm-dev mailing list