This is an archive of the discontinued LLVM Phabricator instance.

[Demangle] replace std::string_view::substr which may throw
AbandonedPublic

Authored by nickdesaulniers on Apr 21 2023, 3:49 PM.

Details

Reviewers
None
Summary

libcxxabi/src/demangle/ copies the implementation from llvm/Demangle.
libcxxabi/ cannot use potentially-throwing std::string_view::substr, so
change llvm/Demangle to avoid these function calls.

I ran into linkage failures stemming from the usage of
std::string_view::substr. substr does a bounds check and may throw.

Fixes: f198e0b594aa ("[StringView] remove dropFront")

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2023, 3:49 PM
nickdesaulniers requested review of this revision.Apr 21 2023, 3:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2023, 3:49 PM
nickdesaulniers abandoned this revision.Apr 21 2023, 3:50 PM