[all-commits] [llvm/llvm-project] 8998f5: Re-land D94976 after revert in e29552c5aff6
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Thu Feb 4 03:17:58 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8998f5843503773c2f51fd475e2c77c687a65ee6
https://github.com/llvm/llvm-project/commit/8998f5843503773c2f51fd475e2c77c687a65ee6
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2021-02-04 (Thu, 04 Feb 2021)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
A llvm/test/DebugInfo/X86/subprogram-across-cus.ll
Log Message:
-----------
Re-land D94976 after revert in e29552c5aff6
This modified patch avoids redirecting the unit in which a subprogram is
created if type units are enabled -- DIEs were getting children allocated
from different units memory pools. Original commit message:
[DWARF] Create subprogram's DIE in DISubprogram's unit
This is a fix for PR48790. Over in D70350, subprogram DIEs were permitted
to be shared between CUs. However, the creation of a subprogram DIE can be
triggered early, from other CUs. The subprogram definition is then created
in one CU, and when the function is actually emitted children are attached
to the subprogram that expect to be in another CU. This breaks internal CU
references in the children.
Fix this by redirecting the creation of subprogram DIEs in
getOrCreateContextDIE to the CU specified by it's DISubprogram definition.
This ensures that the subprogram DIE is always created in the correct CU.
Differential Revision: https://reviews.llvm.org/D94976
More information about the All-commits
mailing list