aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2021-02-04 11:13:53 +0000
committerJeremy Morse <jeremy.morse@sony.com>2021-02-04 11:17:18 +0000
commit8998f5843503773c2f51fd475e2c77c687a65ee6 (patch)
treef592e1b46f0563291bc1382b8644ce08b60deff9 /flang/lib/Frontend/CompilerInvocation.cpp
parent649a3d00df93adb169482d19b67c1492d2693abc (diff)
downloadllvm-8998f5843503773c2f51fd475e2c77c687a65ee6.zip
llvm-8998f5843503773c2f51fd475e2c77c687a65ee6.tar.gz
llvm-8998f5843503773c2f51fd475e2c77c687a65ee6.tar.bz2
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
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions