[all-commits] [llvm/llvm-project] 1d68e0: Reland [DWARF] Location-less inlined variables sho...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Wed Feb 10 07:46:29 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1d68e0a0756476ceee1e62a778021e339c631940
https://github.com/llvm/llvm-project/commit/1d68e0a0756476ceee1e62a778021e339c631940
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2021-02-10 (Wed, 10 Feb 2021)
Changed paths:
M llvm/include/llvm/CodeGen/DbgEntityHistoryCalculator.h
M llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
A llvm/test/DebugInfo/Generic/no-empty-child-vars.ll
M llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
M llvm/test/DebugInfo/NVPTX/debug-info.ll
M llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
Log Message:
-----------
Reland [DWARF] Location-less inlined variables should not have DW_TAG_variable
Originally landed in ddc2f1e3fb4 and reverted in d32deaab4d because of
a Generic test objecting. That was fixed up in 013613964fd9. Original
landing commit message follows:
[DWARF] Location-less inlined variables should not have DW_TAG_variable
Discussed in this thread:
https://lists.llvm.org/pipermail/llvm-dev/2021-January/148139.html
DwarfDebug::collectEntityInfo accidentally distinguishes between variable
locations that never have a location specified, and variable locations that
have an empty location specified. The latter leads to the creation of an
empty variable referring to the abstract origin.
Fix this by seeking a non-empty location before producing a concrete
entity, to guarantee a DW_AT_location will be produced. Other loops in
collectEntityInfo and endFunctionImpl take care of examining the
retainedNodes collection and ensuring optimised-out variables are created.
Differential Revision: https://reviews.llvm.org/D95617
More information about the All-commits
mailing list