<div>Hello</div><br><div>I am working on clang codegen module to parse some information in compile time. So, here is an example LLVM Value:</div><br><div>{ i64, i64 } { i64 ptrtoint (void (%class.Testpm*)* @_ZN6Testpm7m_func1Ev to i64), i64 0 }</div><br><div>I want to parse this Value so that I can check the source type using in <strong>ptrtoint</strong> casting instruction (i.e. <font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(0, 0, 255)">void</span></font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""> (</font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(0, 0, 255)">%class.Testpm*</span></font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">)*</font>). I have tried following:</div><br><div><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(175, 0, 219)">if</span></font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""> (isa<llvm::PtrToIntInst>(Val)) {</font></div><div><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">llvm::IntToPtrInst *iptr = dyn_cast<llvm::PtrToIntInst>(Val);</font></div><div><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">}</font></div><br><div>but it is not working. Any idea?</div><img class="mailspring-open" alt="Open Tracking" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/1537908432.local-a646a70c-05a3-v1.4.2-f587b7b7@getmailspring.com?recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D">