Hi,<div>I'm trying to get all the basic blocks' scope{starting and ending line} information inside a function.</div><div>Seems there's no metadata node attached to basic block. So what I did is</div><div>to get the first instruction and the terminator instruction of the BB, and then</div>
<div>call getDebugLoc to get the line number. But the resulting ranges are not very accurate.</div><div>Similarly I want to get the ending scope line information of a function instead of just the definition line number.</div>
<div><br></div><div>I wonder if there's better way to implement this? </div><div>For example, is it possible to somehow get a DILexicalBlock instance from a BasicBlock?</div><div><br></div><div>Thanks,</div><div>Ryan</div>
<div><br></div><div><br></div><div><br></div>