summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorOCHyams <orlando.hyams@sony.com>2023-04-26 09:11:41 +0100
committerOCHyams <orlando.hyams@sony.com>2023-04-26 09:58:31 +0100
commit3feea34d77f65f0b68520bb7bf372580a72794ad (patch)
tree80f6da7b1afcbc944c2f4ba7360deac839a22f86 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parenta31b3a1a6d60cbb2ca9a110e70f0592aac574f1f (diff)
[DebugInfo] Do not delete debug intrinsics with empty metadata operands
A ValueAsMetadata may be replaced with nullptr for several reasons including deleting (certain) values and value remapping a use-before-def. In the case of a MetadataAsValue user, handleChangedOperand intercepts and replaces the metadata with an empty tuple (!{}). At the moment, an empty metadata operand in a debug intrinsics signals that it can be deleted. Given that we end up with empty metadata operands in circumstances where the Value has been "lost" the current behaviour can lead to incorrect variable locations. Instead, we should treat empty metadata as meaning "there is no location for the variable" (the same as we currently treat undef operands). This patch removes the deletion logic from wouldInstructionBeTriviallyDead. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D140901
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions