<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello everybody,<br><br>What I am trying to do is to create a vector <4 x i32> and save some values to initialize the vector.<br>However, I am using the insertElementInst() and the errors I get are the following;<br><br>error: within this context<br>Instruction *Insert = new InsertElementInst(instr, emptyVec, index0, "test");<br>and<br>error: ‘llvm::InsertElementInst::InsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::Twine&, llvm::Instruction*)’ is private<br><br>The code I have used is the following:<br>Type *Instr_vector = VectorType::get(Int32, 4);<br>Value *emptyVec = UndefValue::get(Instr_vector);<br>Constant* index0 =  Constant::getIntegerValue(u32Ty, llvm::APInt(32, 0));<br>Instruction *Insert = new InsertElementInst(instr, emptyVec, index0, "test");<br>b->getInstList().insertAfter(Xor_flip, Insert);<br><br>Do you have any suggestions for these errors?<br>Thanks in Advance,<br>Vasilis<br>                                       </div></body>
</html>