<div dir="ltr"><div class="">
        <p>Dear All,</p><p>I have a question<br></p><p>How could I use <code>WhileStmt class</code>  in Stmt.h </p>

<p><a href="http://clang.llvm.org/doxygen/Stmt_8h_source.html" rel="nofollow">http://clang.llvm.org/doxygen/Stmt_8h_source.html</a> </p>

<p>to implement <code>while loop</code> like <code>while(i==1){}</code> that is required to be inserted <br></p><p><span class="">For example, Convert x++; y++; to x++; while(i=1){} y++;</span></p><p>from the class's constructor: </p>


<pre style class=""><code><span class="">WhileStmt</span><span class="">(</span><span class="">ASTContext</span><span class=""> </span><span class="">&</span><span class="">C</span><span class="">,</span><span class=""> </span><span class="">VarDecl</span><span class=""> </span><span class="">*</span><span class="">Var</span><span class="">,</span><span class=""> </span><span class="">Expr</span><span class=""> </span><span class="">*</span><span class="">cond</span><span class="">,</span><span class=""> </span><span class="">Stmt</span><span class=""> </span><span class="">*</span><span class="">body</span><span class="">,</span><span class="">SourceLocation</span><span class=""> WL</span><span class="">);</span><span class="">
</span><span class="">//I know C --> 1</span><span class="">
</span><span class="">//Var--> i</span><span class="">
</span><span class="">//cond --> =</span><span class="">
</span><span class="">//body --> NOP</span><span class="">
</span><span class="">//WL --> ??</span></code></pre>

<p>but how to implement these terms in LLVM pass? and what's the SourceLocation?</p>

<p>Thanks</p>

    </div><br clear="all"><br>-- <br><div dir="ltr"><b><span style="color:rgb(0,0,102)">Rasha Salah Omar</span><br style="color:rgb(0,0,102)"><span style="color:rgb(0,0,102)">Msc Student at E-JUST</span><br style="color:rgb(0,0,102)">
<span style="color:rgb(0,0,102)">Demonestrator  at Faculty of Computers and Informatics</span><br style="color:rgb(0,0,102)"><span style="color:rgb(0,0,102)">Benha University</span><br></b></div>
</div>