<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Aug 9, 2014 at 6:06 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Rob,<br>
<div><br>
On 9 August 2014 02:03, Rob Jansen <<a href="mailto:jansen@cs.umn.edu" target="_blank">jansen@cs.umn.edu</a>> wrote:<br>
> Why is the first for loop not equivalent to the second?<br>
<br>
</div>In the second loop, "*ui" is an llvm::Use object. It's owned by a<br>
User, but isn't a subclass of one. To match the first loop, you either<br>
need to call Value::user_begin instead of use_begin, or do the cast on<br>
"ui->getUser()".<br></blockquote><div><br></div>I think this is incorrect since the use_iterator is defined as:<div><br></div><div>`typedef value_use_iterator<User> use_iterator;`<br></div><div><br></div>
<div>and indeed `ui->getUser();` is not a callable function on a User. What am I missing?</div><div><br></div><div>-RobĀ </div></div></div></div>