[LLVMdev] set line number debug info

Abhirup Ghosh abhirupju at gmail.com
Mon Mar 14 00:56:40 PDT 2011


Hi,
      I am new to LLVM infrastructure. Recently I am trying to set the debug
info for an instruction. The main aim is to set the source line number of an
instruction. Can anyone please show how to do that?
      I think  that setMetadata method in Instruction class is to be used.
But how do I create MDNode* consisting of desired source line number. Source
line number can be extracted from the instruction-debug-info using
getMetadata method and then using getLineNumber method from DILocation
class. Unfortunately DILocation class does not have any function like
setLinenumber.


Abhirup Ghosh
M. Tech
Department of Computer Science & Engg.
IIT, Bombay
email - abhirupju at gmail.com , abhirup at cse.iitb.ac.in
Contact - 9920735181
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110314/c15a824c/attachment.html>


More information about the llvm-dev mailing list