<div dir="ltr">Hello,<div><br></div><div>I am currently in the process of retrieving the virtual function pointers from the vtable though writing a pass and examining the IR.</div><div><br></div><div>I know that the vtable is represented with names beginning in "_ZTV" and i32 (...)** represents the type of the vptr fields. </div><div><br></div><div>Where I am stuck and need help with is in getting the vptr addresses from the array being accessed by the getelementptr:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="font-size:12.800000190734863px"> store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @_ZTV9Rectangle, i32 0, i32 2) to i32 (...)**), i32 (...)*** %5, align 8</span></div></blockquote><div><span style="font-size:12.800000190734863px"><br></span></div><div>I am able to get this operand from the store instruction op[0] and know that it is a ConstantExpr, how do i access the individual indices. I know that I need the info from index 2 till 5 in this case. </div><div><br></div><div>Can anyone help with getting the vptr address from within the table?</div><div><br></div><div>Thanks,</div><div><br></div><div>Dami </div></div>