[PATCH] D148348: [StringView] remove dropFront

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 09:17:14 PDT 2023


nickdesaulniers created this revision.
nickdesaulniers added reviewers: MaskRay, erichkeane.
Herald added subscribers: JDevlieghere, hiraditya.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Towards converting our use of llvm::StringView to std::string_view,
remove a method that std::string_view doesn't have.
llvm::StringView::dropFront is semantically similar to
std::string_view::substr but with the input clamped to the size. No code
was relying on clamping other than the rust demangler, which I fixed in
https://reviews.llvm.org/D148272. I've added asserts just in case.
Removing this method makes it easier to switch over code later.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148348

Files:
  llvm/include/llvm/Demangle/ItaniumDemangle.h
  llvm/include/llvm/Demangle/StringView.h
  llvm/lib/Demangle/MicrosoftDemangle.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148348.513626.patch
Type: text/x-patch
Size: 8792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/cdfa8e0a/attachment-0001.bin>


More information about the llvm-commits mailing list