[PATCH] D73772: [DebugInfo][test] Adjust line table unit length to account for contents
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 04:19:16 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1271cde47456: [DebugInfo][test] Adjust line table unit length to account for contents (authored by jhenderson).
Changed prior to commit:
https://reviews.llvm.org/D73772?vs=241667&id=242018#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73772/new/
https://reviews.llvm.org/D73772
Files:
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
Index: llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
===================================================================
--- llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -175,6 +175,7 @@
P.TotalLength += 4;
P.FormParams.Format = DWARF64;
}
+ P.TotalLength += Contents.size();
P.FormParams.Version = Version;
P.MinInstLength = 1;
P.MaxOpsPerInst = 1;
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
===================================================================
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -549,9 +549,8 @@
LT.addStandardOpcode(DW_LNS_const_add_pc, {});
LT.addExtendedOpcode(1, DW_LNE_end_sequence, {});
DWARFDebugLine::Prologue Prologue = LT.createBasicPrologue();
- // Set the total length to 1 higher than the actual length. The program body
- // has size 5.
- Prologue.TotalLength += 6;
+ // Set the total length to 1 higher than the actual length.
+ ++Prologue.TotalLength;
LT.setPrologue(Prologue);
generate();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73772.242018.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200203/25ee6768/attachment-0001.bin>
More information about the llvm-commits
mailing list