[PATCH] D39981: [DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 14:26:33 PST 2017


JDevlieghere created this revision.

In constructAbstractSubprogramScopeDIE there can be a potential mismatch
between `this` and the CU of ContextDIE when a scope is shared between
two DISubprograms belonging to a different CU. In that case, `this` is
the CU that was specified in the IR, but the CU of ContextDIE is that of
the first subprogram that was emitted. This patch fixes the mismatch by
looking up the CU of ContextDIE, and switching to use that.

This fixes PR35212 (https://bugs.llvm.org/show_bug.cgi?id=35212)

Patch by Philip Craig!


Repository:
  rL LLVM

https://reviews.llvm.org/D39981

Files:
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  test/DebugInfo/cross-cu-scope.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39981.122729.patch
Type: text/x-patch
Size: 9140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171113/e90e72b0/attachment.bin>


More information about the llvm-commits mailing list