[PATCH] D149703: [Demangle] remove unused params of itaniumDemangle

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 09:53:01 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/ProfileData/GCOV.cpp:343
+        char *res = itaniumDemangle(Name.data(), &status);
         if (status == 0) {
           demangled = res;
----------------
MaskRay wrote:
> `llvm-cov gcov` uses `status`.
Not meaningfully; all of the call sites seem confused by this terrible interface. Does returning `nullptr` indicate failure to demangle? Does `status` returning non-zero mean demangling failed? Should I free the result?

The interface is bad.  It should return a `std::string` that's empty upon demangling failure.

https://reviews.llvm.org/D149707 is the follow up to remove status.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149703



More information about the llvm-commits mailing list