[llvm-dev] Metadata/DebugInfo in *.ll file

Norbert Dajka via llvm-dev
Mon, 14 Jan 2019 14:26:03 -0000

Hi list,

I found relevant documentation regarding DebugInfo creation in the LLVM IR
bytecode. It can be done for compileunits, functions, and other constructs,
with the help of DIBuilder class. However I can't save debug information
related to individual llvm::Instructions. I tried DebugLoc, DILocation
setting directly with setMetadata(). I tried other ways, for e.g.:
insertDbgValueIntrinsic(). If I set invalid parameters for the call, then
the LLVM passes warn me, correctly, so at least I see in the log, that LLVM
tries to assign debuginfo to given instruction. If however I set valid
parameters, then I suppose, that the passes drop the debuginfo related to
an Instruction.
Do you know a surefire way to avoid the drop of instruction related
debuginfo?

Thanks for your time,
Norbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190114/596f9bee/attachment.html>