clayborg added a comment.

LGTM if the RichManglingContext isn't actually demangling the string anyway, no 
need to force it to do so and cache the results.



================
Comment at: lldb/source/Symbol/Symtab.cpp:388-389
   // Only register functions that have a base name.
   rmc.ParseFunctionBaseName();
   llvm::StringRef base_name = rmc.GetBufferRef();
   if (base_name.empty())
----------------
I was checking this function out as the only user of RichManglingContext. Seems 
that we could modify RichManglingContext::ParseFunctionBaseName() to just 
return the base name? Seems weird to call parse and then fetch. Could also just 
rename to "StringRef RichManglingContext::GetFunctionBaseName(). 

In fact the RichManglingContext class has the notion of an internal buffer 
where people call some parse routine and then call 
RichManglingContext::GetBufferRef()? Seems like we should just get rid of the 
internal buffer and just return it each time from all of the 
RichManglingContext::ParseXXX routines. Not needed, but just something I found 
interesting about the RichManglingContext class implementation.


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

https://reviews.llvm.org/D118814

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to