<div dir="ltr"><div>Hi,<br></div>For the following code <br><div><div> const Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());<br> AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb);<br>
Bb->getInstList().push_back(newInst);<br><br></div><div>It gives me the error<br>" error: no matching constructor for initialization of 'llvm::AllocaInst'<br> AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb);"<br>
<br><br></div><div>By using Instruction<br><br> const Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());<br> Instruction* newInst = new Instruction(Int32Type, 0, "flag", Bb);<br> Bb->getInstList().push_back(newInst);<br>
<br><br>error: allocating an object of abstract class type 'llvm::Instruction'<br> Instruction* newInst = new Instruction(Int32Type, 0, "flag", Bb);<br></div><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></div></div>