diff options
author | David Blaikie <dblaikie@gmail.com> | 2021-12-14 11:45:23 -0800 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2021-12-14 14:50:43 -0800 |
commit | 71e5488a195dde08a76e923814e036c68033869f (patch) | |
tree | 889a5c28280970750ff228720bf4f31fab62098f /llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp | |
parent | 5740bb801a14efd5239a0e521395c09e71e61f5c (diff) | |
download | llvm-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/DWARFDebugInfoTest.cpp')
-rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp index a4e6b56..68d0600 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -1504,7 +1504,7 @@ TEST(DWARFDebugInfo, TestAttributeIterators) { ASSERT_NE(E, I); EXPECT_EQ(I->Attr, DW_AT_name); - auto ActualCUPath = I->Value.getAsCString(); + auto ActualCUPath = toString(I->Value); EXPECT_EQ(CUPath, *ActualCUPath); ASSERT_NE(E, ++I); |