<div dir="ltr">Hi all,<div><br></div><div>I need to know the line number range of a function. The start of the function line number can be found by the definition point, which is stored at the subprogram metadata: <span style="background-color:rgb(238,238,238)"><font face="courier new, monospace">DISubprogram::getLineNumber().</font></span></div>

<div><br></div><div style>However, there is no API (or the metadata in the first place) to know the end of the function.</div><div style><br></div><div style>I have to visit all the instructions of the function and maintain the <i>max</i> line number of the instructions. I use the <span style="background-color:rgb(238,238,238)"><font face="courier new, monospace">inst_begin(func): inst_end(func)</font></span> as the iterator. But I don't think it's effective to iterate all the instructions from the beginning. It's supposed that we can iterate the instructions reversely and the first one who has attached metadata should be treated as the end of the function. Unfortunately, there is no reverse iterator of a function.</div>

<div><br></div><div>Any idea?</div><div><br></div><div>Thank you very much!<br clear="all"><div><br></div>-- <br><font face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)" color="#666666">Mingliang LIU (刘明亮 in Chinese)<br>

<br>PACMAN Group,  Dept. of Computer Science & Technology<br>Tsinghua University, Beijing 100084, China<br>Email: <a href="mailto:liuml07@mails.tsinghua.edu.cn" target="_blank">liuml07@mails.tsinghua.edu.cn</a></font><div>

<font face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)" color="#666666">Homepage: <a href="http://pacman.cs.tsinghua.edu.cn/~liuml07" style="line-height:19px;text-align:center" target="_blank">http://pacman.cs.tsinghua.edu.cn/~liuml07/</a></font></div>


</div></div>