[PATCH] D149675: [Demangle] convert itaniumDemangle and nonMicrosoftDemangle to use std::string_view

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 15:01:46 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Demangle/Demangle.cpp:50
+                                std::string &Result) {
   char *Demangled = nullptr;
+  if (isItaniumEncoding(MangledName.data()))
----------------
nickdesaulniers wrote:
> MaskRay wrote:
> > I think it's best for the `if (!MangledName) return false;` change to be made in this patch, not in the precursor patch.
> > 
> > `isItaniumEncoding`/etc still take `const char *` arguments and it makes sense for them to keep strict by disallowing `nullptr` arguments.
> I suspect you are referring to https://reviews.llvm.org/D151003#4391457.
> 
> In that case, I will drop the nullptr check from D151003.  I will land this (D149675) as is.
> isItaniumEncoding/etc still take const char * arguments and it makes sense for them to keep strict by disallowing nullptr arguments.

I thought I had fixed that already.  Ah! Yeah, but it was backed out as part of:

https://reviews.llvm.org/D149104#change-M6oofoKhLOim

I'll break that off into a separate patch since it's a good change to make separate from landing the top down refactoring.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149675



More information about the llvm-commits mailing list