<div dir="ltr"><br><br><div class="gmail_quote">2011/4/26 Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Nabila,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now when i tried this pass an error says:<br>
Wrong type for attribute noalias<br>
tail call void @consume(i32 noalias 3, i32* @y) nounwind<br>
</blockquote>
<br></div>
noalias is only for arguments of pointer type.  You probably meant it to<br>
be on the second argument rather than the first.  I suggest you correct<br>
your code that adds the attribute.<br>
<br>
Ciao, Duncan.<br>
</blockquote></div><br><div>no my fucntion is </div><div>void consume(int nb_into_bloc, int *nb_total) </div><div>the second is a pointer</div><div>here is how I pass the parameters</div><div> Instruction* ii = i->getTerminator();</div>
<div> const int n = cast <int> (i->size());</div><div><div> ConstantInt* inValue = ConstantInt::get(Type::getInt32Ty(Context), n);</div><div>                  </div><div> std::vector<Value*> int32_16_params;</div>
<div> int32_16_params.push_back(inValue);</div><div> int32_16_params.push_back(gvar_int32_y);</div><div>                  </div><div> CallInst* int32_16 = CallInst::Create(func_consume, int32_16_params.begin(), int32_16_params.end(), "", ii);</div>
<div>                   </div></div></div>