HomePhabricator

Merging r318289:

Authored by tstellar on Nov 17 2017, 10:48 AM.

Description

Merging r318289:


r318289 | jdevlieghere | 2017-11-15 02:57:05 -0800 (Wed, 15 Nov 2017) | 14 lines

[DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.

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!

Differential revision: https://reviews.llvm.org/D39981

llvm-svn: 318542

Details

Committed
tstellarNov 17 2017, 10:48 AM
Differential Revision
D39981: [DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.
Parents
rGb4d5c6518644: Merging r318207:
Branches
Unknown
Tags
Unknown