<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr">On Mon, Dec 10, 2012 at 1:45 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chandler,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ /// \brief Mark the visit as aborted. Intended for use in a void<br>
return.<br>
<br>
<br>
Intended for use in a void return? What does this mean? What happens if I is<br>
used for an instruction that is not a void return?<br>
<br>
<br>
The 'set' methods are intended to work cleanly with code like:<br>
<br>
void visitMyInstruction(<u></u>MyInstruction &I) {<br>
// .. some code ..<br>
<br>
if (detectErrorCondition())<br>
return PI.setAborted(&I);<br>
<br>
// .. rest of my code ..<br>
}<br>
<br>
Thus, they are designed to be called within a void-type return statement by the<br>
implementor of the visitor. Does that clarify? It has nothing to do with the<br>
return of the LLVM IR under analysis.<br>
</blockquote>
<br></div>
are you saying that the user should not continue to use the visitor after having<br>
called setAborted, and should bail out at once?</blockquote><div><br></div><div style>Nothing breaks if the user continues to use it. Setting abort just halts the visit across the uses. Often this is done when the user is no longer interested in the results, including the visit currently taking place, so this is expected to be a common pattern but not necessarily a required pattern. </div>
</div></div></div></div>