[Lldb-commits] [PATCH] D151003: [Damangle] convert dlangDemangle to use std::string_view

Nick Desaulniers via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 5 10:17:20 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Demangle/DLangDemangle.cpp:555
 
-    Demangler D = Demangler(MangledName);
-    MangledName = D.parseMangle(&Demangled);
+    Demangler D(MangledName.data());
+    const char *M = D.parseMangle(&Demangled);
----------------
efriedma wrote:
> Isn't this still assuming MangledName is null-terminated?
(I have a rewrite of the D language demangler to use std::string_view throughout, which I will post shortly; I believe that addresses your concern)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151003



More information about the lldb-commits mailing list