<div dir="ltr">You can get the context of the module and the function which you want to insert the basicblock.<div style>Then you can use </div><div style>BasicBlock::Create(context, "NameofBasicBlock", F); </div>
<div style>to create your basicblock. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/24 Rasha Omar <span dir="ltr"><<a href="mailto:rasha.sala7@gmail.com" target="_blank">rasha.sala7@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Using Module Pass<br>How could I insert new basic blocks such as<br></div>while(i==1) {} <br></div>
 in the IR and also change the predecessors and successors according to inserting these basic blocks.<span class="HOEnZb"><font color="#888888"><br>
<br><div><div><div><div><div><div><div>-- <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></div></div></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>