aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2021-12-14 11:45:23 -0800
committerDavid Blaikie <dblaikie@gmail.com>2021-12-14 14:50:43 -0800
commit71e5488a195dde08a76e923814e036c68033869f (patch)
tree889a5c28280970750ff228720bf4f31fab62098f /llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
parent5740bb801a14efd5239a0e521395c09e71e61f5c (diff)
downloadllvm-71e5488a195dde08a76e923814e036c68033869f.zip
llvm-71e5488a195dde08a76e923814e036c68033869f.tar.gz
llvm-71e5488a195dde08a76e923814e036c68033869f.tar.bz2
DebugInfo: Migrate callers from getAsCString to dwarf::toString
This makes a bunch of these call sites independent of a follow-up change I'm making to have getAsCString return Expected<const char*> for more descriptive error messages so that the failures there can be communicated up to DWARFVerifier (or other callers who want to provide more verbose diagnostics) so DWARFVerifier doesn't have to re-implement the string lookup logic and error checking.
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index c01a20e91..a8502df 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -170,11 +170,11 @@ void checkDefaultPrologue(uint16_t Version, DwarfFormat Format,
EXPECT_EQ(Prologue.StandardOpcodeLengths, ExpectedLengths);
ASSERT_EQ(Prologue.IncludeDirectories.size(), 1u);
ASSERT_EQ(Prologue.IncludeDirectories[0].getForm(), DW_FORM_string);
- EXPECT_STREQ(*Prologue.IncludeDirectories[0].getAsCString(), "a dir");
+ EXPECT_STREQ(*toString(Prologue.IncludeDirectories[0]), "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");
+ EXPECT_STREQ(*toString(Prologue.FileNames[0].Name), "a file");
}
#ifdef _AIX