<div><br></div><div>Hi,</div><div>    I'm trying to write a pass to detect all free()/delete() call instructions in LLVM IR.<span style="line-height: 1.5;">The method is as follows.</span></div><div>    First I find Call Instructions: <u>CallInst *CI=dyn_cast<CallInst>(&*i);</u></div><div>    then see if the Function name matches:</div><div>                        <u>name=CI->getCalledFunction()->getName(); if(name=="_ZdlPv"||name=="_ZdaPv"||name=="free")</u></div><div>    It worked but when <span style="line-height: 1.5;"> </span><span style="line-height: 1.5;">something like this occurs</span></div><div>   <u> %call2 = call i32 bitcast (i32 (...)* @free to i32 (i8*)*)(i8* %call1) nounwind, !dbg !16</u></div><div>    It seems like a indirect function call and I don't know how to detect free() in such situation.</div><div>    By the way, is there any way that is more convenient to <span style="line-height: 1.5;">detect all free()/delete() call instructions in a module except by matching the function name?</span></div>