[Lldb-commits] [PATCH] D85243: Factor out common code from the iPhone/AppleTV/WatchOS simulator platform plugins. (NFC)

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 6 12:52:25 PDT 2020


aprantl added inline comments.


================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp:85
+  if (!m_sdk.empty())
+    strm.Printf("  SDK Path: \"%s\"\n", m_sdk.str().c_str());
+  else
----------------
JDevlieghere wrote:
> If you use `<<` you could drop the `.str().c_str()`. Alternatively, you could use `Format` which uses the `llvm::fmt` logic.
that makes sense, yes.


================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h:96
 protected:
+  const char *m_class_name;
+  const char *m_description;
----------------
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?



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

https://reviews.llvm.org/D85243



More information about the lldb-commits mailing list