aprantl added inline comments.
================ Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h:96 protected: + const char *m_class_name; + const char *m_description; ---------------- JDevlieghere wrote: > aprantl wrote: > > JDevlieghere wrote: > > > "While you are here" could we make these StringRefs? > > I could, but these are used specifically/only for the lldb Plugin API: > > > > `const char *GetDescription() override { return m_description; }` > > > > Do you think it's worth doing regardless? > > > I think it'd be nice, but more something for a separate NFC patch. It's > definitely not that important and I'm sure you have better stuff to do :p I just tried to do this, which made me realize that a StringRef is objectively worse. A StringRef doesn't guarantee a NUL-terminated string, so we'd either need to make this a documented requirement (kind of dangerous) or write return m_description.str().c_str(), which is also silly. The right thing to do is to change the Plugin interface itself to use StringRef. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85243/new/ https://reviews.llvm.org/D85243 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits