diff options
author | Sterling Augustine <saugustine@google.com> | 2020-02-10 12:19:35 -0800 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2020-02-10 12:24:46 -0800 |
commit | 0bd48c3d4ee1a94ea3d3b9d89201b23fd83c94d0 (patch) | |
tree | fbf6be309001085e9dfd6d330601599e0a77b7ba /llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp | |
parent | c1adb88a31f37c7f2990c85a1f9297f44a23d32c (diff) | |
download | llvm-0bd48c3d4ee1a94ea3d3b9d89201b23fd83c94d0.zip llvm-0bd48c3d4ee1a94ea3d3b9d89201b23fd83c94d0.tar.gz llvm-0bd48c3d4ee1a94ea3d3b9d89201b23fd83c94d0.tar.bz2 |
[DebugInfo] Support file-level include directories when generating DWARFv5 LineTable prologues.
Differential Revision: https://reviews.llvm.org/D74249
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp')
-rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp index 428f48e..5d03746 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp @@ -180,7 +180,7 @@ void checkDefaultPrologue(uint16_t Version, DwarfFormat Format, UnitLength = PrologueLength + 2; break; case 5: - PrologueLength = 39; + PrologueLength = 42; UnitLength = PrologueLength + 4; EXPECT_EQ(Prologue.getAddressSize(), 8u); EXPECT_EQ(Prologue.SegSelectorSize, 0u); @@ -204,6 +204,7 @@ void checkDefaultPrologue(uint16_t Version, DwarfFormat Format, EXPECT_STREQ(*Prologue.IncludeDirectories[0].getAsCString(), "a dir"); ASSERT_EQ(Prologue.FileNames.size(), 1u); ASSERT_EQ(Prologue.FileNames[0].Name.getForm(), DW_FORM_string); + ASSERT_EQ(Prologue.FileNames[0].DirIdx, 0u); EXPECT_STREQ(*Prologue.FileNames[0].Name.getAsCString(), "a file"); } |