Let us say there is an Instruction I in an IR. Is there any function using which I can know that in which line number this Instruction I lies in the original c++ file?? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100722/e43be8d3/attachment.html>
Hi,> Let us say there is an Instruction I in an IR. > Is there any function using which I can know that in which line number > this Instruction I lies in the original c++ file??for this you need to use debug info. It is a frequently asked question so I suggest you search the mailing list archives. Ciao, Duncan.
RAJWINDER SINGH wrote:> Let us say there is an Instruction I in an IR. > Is there any function using which I can know that in which line number > this Instruction I lies in the original c++ file??Try looking at http://llvm.org/docs/SourceLevelDebugging.html; it provides information on the source level debugging metadata in LLVM IR. -- John T.