[PATCH] D148959: [Demangle] replace std::string_view::substr which may throw

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 14:08:44 PDT 2023


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

> The "upstream" source of this file is in libcxxabi/src/demangle/. As I ...

The paragraph felt a bit confusing before I clicked and read D148566 <https://reviews.llvm.org/D148566>.

You may say that libcxxabi/src/demangle/ copies the implementation from llvm/Demangle. libcxxabi/ cannot use potentially-throwing `std::string_view::substr`, so we change llvm/Demangle to avoid these function calls.
Then in a separate graph add evidence how libcxxabi cannot use potentially-throwing functions ("I ran into linkage failures stemming from the usage of std::string_view::substr. substr does a bounds check and may throw.")


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148959/new/

https://reviews.llvm.org/D148959



More information about the llvm-commits mailing list