[Lldb-commits] [PATCH] D50071: Use rich mangling information in Symtab::InitNameIndexes()
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 8 02:19:43 PDT 2018
sgraenitz added inline comments.
Comment at: source/Core/RichManglingContext.cpp:133
+ case PluginCxxLanguage:
+ m_cxx_method_str = ConstString(
> I thought we were going to get rid of this ConstString? The C++ plugin is able to provide the same (in fact, even stronger) lifetime guarantees as the IPD, so we could just have a single method that always returns a StringRef. (If you really want to, you can also have a ConstString-returning helper function, but it could be implemented the same way as it is now for IPD, so that both versions have the same runtime complexity.
> I'd suggest having just a m_buffer StringRef object, which you set both here and in processIPDStrResult. Then `GetBufferRef()` can just return that object without any branching involved.
Yes, I can change the ConstString thing here.
> I'd suggest having just a m_buffer StringRef object
You mean a single buffer for both, IPD and C++ method parser plugin? Actually I don't like to mix that. In case of IPD the buffer is owned by the context. Otherwise it's owned by the C++ method parser plugin. I could manage that in `FromItaniumName` and `FromCxxMethodName`, but it will make everything more complicated. Top prio for me is to avoid reallocation of the relatively big initial `m_IPD_buf` and I think the cleanest way to do this is the RAII-style that's used already.
More information about the lldb-commits