This is an archive of the discontinued LLVM Phabricator instance.

[Demangle] avoid more std::string_view::substr
AbandonedPublic

Authored by nickdesaulniers on May 24 2023, 12:22 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

In D148959, I removed usage of std::string_view::substr because it may
throw, and libcxxabi cannot use such code. I missed one instance in
llvm::starts_with. That is blocking copying the code back upstream in
D148566.

Mark these helpers noexcept (as they are in C++20) as well, to remind
future travelers.

Make these changes upstream, and copy them back downstream using
libcxxabi/src/demangle/cp-to-llvm.sh.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 12:22 PM
nickdesaulniers requested review of this revision.May 24 2023, 12:22 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 24 2023, 12:22 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
nickdesaulniers abandoned this revision.May 24 2023, 12:23 PM