[llvm-dev] Finding line numbers in source code associated with given bitcode instructions

via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 28 07:12:36 PST 2018


It looks like using one of clang's `-Rpass` remark options would annotate instructions with source locations, without actually producing any debug info (type info etc).  If that doesn't work, `-gmlt` (aka `-gline-tables-only`) should do the trick.
--paulr

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Carter Cheng via llvm-dev
Sent: Wednesday, November 28, 2018 9:09 AM
To: llvm-dev at lists.llvm.org
Subject: [llvm-dev] Finding line numbers in source code associated with given bitcode instructions

Hello,

Is it possible to somehow similar to how DWARF functions with assembly find out which line numbers in unoptimized code are associated with which bitcode instructions for the purpose of debugging compiler passes? I am curious about whether this is possible prior to writing some instrumentation passes for the purpose of debugging them.

Thanks in advance,

Carter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181128/fd107257/attachment.html>


More information about the llvm-dev mailing list