[DebugInfo] Fix: Variables that have no non-empty values being emitted when they...
authorStephen Tozer <Stephen.Tozer@Sony.com>
Tue, 20 Dec 2022 10:01:56 +0000 (10:01 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sun, 25 Dec 2022 21:28:27 +0000 (13:28 -0800)
commitc290a8b7a4aa0fefd2c9f3f13a1bb507d8608d7d
treed460505c77f04da9bd5bbe07b06e04cbcfd6eb0d
parent3d5db75788b564190614f747b4cb0920a9bcdf72
[DebugInfo] Fix: Variables that have no non-empty values being emitted when they have a DBG_VALUE_LIST

This patch fixes a simple bug where `DbgValueHistoryMap::hasNonEmptyLocation` was incorrectly handling DBG_VALUE_LIST instructions, treating empty values as non-empty, causing empty variables to be emitted into DWARF.

Reviewed By: Orlando

Differential Revision: https://reviews.llvm.org/D133925
llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
llvm/test/DebugInfo/X86/dbg_value_list_emission.mir