[PATCH] D159226: Emit line numbers in CodeView for trailing (after `ret`) blocks from inlined functions

Daniel Paoliello via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 14:03:15 PDT 2023


dpaoliello created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dpaoliello requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Issue Details:
When building up line information for CodeView debug info, LLVM attempts to gather the "range" of instructions within a function as these are printed together in a single record. If there is an inlined function, then those lines are attributed to the original function to enable generating `S_INLINESITE` records. However, this thus requires there to be instructions from the inlining function after the inlined function otherwise the instruction range would not include the inlined function.

Fix Details:
Include inlined instructions in the range for both the inlined and inlining function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159226

Files:
  llvm/lib/MC/MCCodeView.cpp
  llvm/test/DebugInfo/COFF/trailing-inlined-function.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159226.554824.patch
Type: text/x-patch
Size: 17766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/489ac75a/attachment.bin>


More information about the llvm-commits mailing list