[llvm] r370289 - [ObjectYAML] Fix lifetime issue in dumpDebugLines
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 19:36:48 PDT 2019
Author: vitalybuka
Date: Wed Aug 28 19:36:48 2019
New Revision: 370289
URL: http://llvm.org/viewvc/llvm-project?rev=370289&view=rev
Log:
[ObjectYAML] Fix lifetime issue in dumpDebugLines
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66901
Modified:
llvm/trunk/test/ObjectYAML/MachO/DWARF-debug_line.yaml
llvm/trunk/tools/obj2yaml/dwarf2yaml.cpp
Modified: llvm/trunk/test/ObjectYAML/MachO/DWARF-debug_line.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ObjectYAML/MachO/DWARF-debug_line.yaml?rev=370289&r1=370288&r2=370289&view=diff
==============================================================================
--- llvm/trunk/test/ObjectYAML/MachO/DWARF-debug_line.yaml (original)
+++ llvm/trunk/test/ObjectYAML/MachO/DWARF-debug_line.yaml Wed Aug 28 19:36:48 2019
@@ -557,21 +557,21 @@ DWARF:
#CHECK: SubOpcode: DW_LNE_set_address
#CHECK: Data: 4294971216
#CHECK: - Opcode: 0x14
-#CHECK: Data: 4294971216
+#CHECK: Data: 0
#CHECK: - Opcode: DW_LNS_set_column
#CHECK: Data: 3
#CHECK: - Opcode: DW_LNS_set_prologue_end
-#CHECK: Data: 3
+#CHECK: Data: 0
#CHECK: - Opcode: DW_LNS_const_add_pc
-#CHECK: Data: 3
+#CHECK: Data: 0
#CHECK: - Opcode: 0xBB
-#CHECK: Data: 3
+#CHECK: Data: 0
#CHECK: - Opcode: 0xBB
-#CHECK: Data: 3
+#CHECK: Data: 0
#CHECK: - Opcode: DW_LNS_advance_pc
#CHECK: Data: 11
#CHECK: - Opcode: DW_LNS_extended_op
#CHECK: ExtLen: 1
#CHECK: SubOpcode: DW_LNE_end_sequence
-#CHECK: Data: 11
+#CHECK: Data: 0
#CHECK: ...
Modified: llvm/trunk/tools/obj2yaml/dwarf2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/dwarf2yaml.cpp?rev=370289&r1=370288&r2=370289&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/dwarf2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/dwarf2yaml.cpp Wed Aug 28 19:36:48 2019
@@ -287,7 +287,7 @@ void dumpDebugLines(DWARFContext &DCtx,
const uint64_t LineEnd =
LineTableLength + *StmtOffset + SizeOfPrologueLength;
while (Offset < LineEnd) {
- DWARFYAML::LineTableOpcode NewOp;
+ DWARFYAML::LineTableOpcode NewOp = {};
NewOp.Opcode = (dwarf::LineNumberOps)LineData.getU8(&Offset);
if (NewOp.Opcode == 0) {
auto StartExt = Offset;
More information about the llvm-commits
mailing list