aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2023-07-12 10:49:00 +0200
committerDavid Stenberg <david.stenberg@ericsson.com>2023-07-12 12:03:44 +0200
commit6aa94c64a532237674433713a70ec2bda57b4fed (patch)
tree6ae019f71e719275837cfbfd6ee9a2183702e69f /llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
parent4ec3ea8afa3448d5343354e1e34ea0513f7e7d13 (diff)
downloadllvm-6aa94c64a532237674433713a70ec2bda57b4fed.zip
llvm-6aa94c64a532237674433713a70ec2bda57b4fed.tar.gz
llvm-6aa94c64a532237674433713a70ec2bda57b4fed.tar.bz2
[DWARF] Add printout for op-index
This is a preparatory patch for extending DWARFDebugLine to properly parse line number programs with maximum_operations_per_instruction > 1 for VLIW targets. Add some scaffolding for handling op-index in line number programs, and add printouts for that in the table. As this affects a lot of tests, this is done in a separate commit to get a cleaner review for the actual op-index implementation. Verbose printouts are not present in many tests, and adding op-index to those will require a bit more code changes, so that is done in the actual implementation patch. Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D152535
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index 9c5e1c1..8711867 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -1554,8 +1554,10 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) {
EXPECT_EQ(NextLine(), " name: \"a file\"");
EXPECT_EQ(NextLine(), " dir_index: 0");
EXPECT_EQ(NextLine(), "");
- EXPECT_EQ(NextLine(), " Address Line Column File ISA Discriminator Flags");
- EXPECT_EQ(NextLine(), " ------------------ ------ ------ ------ --- ------------- -------------");
+ EXPECT_EQ(NextLine(), " Address Line Column File "
+ "ISA Discriminator OpIndex Flags");
+ EXPECT_EQ(NextLine(), " ------------------ ------ ------ ------ "
+ "--- ------------- ------- -------------");
EXPECT_EQ(NextLine(),
"0x00000038: 00 Badly formed extended line op (length 0)");
EXPECT_EQ(NextLine(),
@@ -1569,7 +1571,7 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) {
EXPECT_EQ(NextLine(), "0x00000055: 00 DW_LNE_set_discriminator (127)");
EXPECT_EQ(NextLine(), "0x00000059: 01 DW_LNS_copy");
EXPECT_EQ(NextLine(), " 0x0123456789abcdef 1 0 1 "
- "0 127 is_stmt");
+ "0 127 0 is_stmt");
EXPECT_EQ(NextLine(), "0x0000005a: 02 DW_LNS_advance_pc (11)");
EXPECT_EQ(NextLine(), "0x0000005c: 03 DW_LNS_advance_line (23)");
EXPECT_EQ(NextLine(), "0x0000005e: 04 DW_LNS_set_file (33)");
@@ -1588,10 +1590,10 @@ TEST_F(DebugLineBasicFixture, VerboseOutput) {
EXPECT_EQ(NextLine(), "0x00000078: ff address += 17, line += -3");
EXPECT_EQ(NextLine(),
" 0x0123456789abce53 20 44 33 66 "
- " 0 basic_block prologue_end epilogue_begin");
+ " 0 0 basic_block prologue_end epilogue_begin");
EXPECT_EQ(NextLine(), "0x00000079: 00 DW_LNE_end_sequence");
EXPECT_EQ(NextLine(), " 0x0123456789abce53 20 44 33 "
- "66 0 end_sequence");
+ "66 0 0 end_sequence");
EXPECT_EQ(NextLine(), "");
EXPECT_EQ(Output.size(), Pos);
}