[PATCH] D108261: [DebugInfo] Fix end_sequence of debug_line in LTO Object

Kyungwoo Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 13 11:55:50 PST 2021


kyulee added inline comments.


================
Comment at: llvm/include/llvm/MC/MCDwarf.h:221
+  void addEndEntry(MCSymbol *EndLabel) {
+    if (PrevSec) {
+      auto *LastEntry = &MCLineDivisions[PrevSec].back();
----------------
kyulee wrote:
> dblaikie wrote:
> > When does this case come up? I think all of this would only happen when PrevCU was non-null/had been populated with some content first, right?
> Correct. I changed it to an assert.
It turned out that there is the case where the line entry is empty in PrevCU. So I restored it with this check.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108261/new/

https://reviews.llvm.org/D108261



More information about the llvm-commits mailing list