<div dir="ltr">Hi All,<div><br></div><div>I am facing an issue with CallInst with nested bitcast instruction. I want to check if the return type of a call is void or non-void the below line works well for CallInst without bit cast.</div>



<div><br></div><div><b>cast<CallInst>(I)->getCalledFunction()->getReturnType()->isVoidTy()</b></div><div><br></div><div>But for Call instructions likeĀ </div><div><b>call void bitcast (void (%struct.jpeg_compress_struct.131*, i32)* @jinit_c_master_control to void (%struct.jpeg_compress_struct.109*, i32)*)(%struct.jpeg_compress_struct.109* %0, i32 0)</b></div>



<div><b><br></b></div><div>getCalledFuncion returns null and the pass crashes.</div><div><br></div><div>Thanks!</div><div>Manish</div><div><b><br></b></div></div>