[Lldb-commits] [PATCH] D112457: Modernize and simplify HostInfo::GetOSKernelDescription

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 25 10:43:47 PDT 2021


labath marked 2 inline comments as done.
labath added inline comments.


================
Comment at: lldb/include/lldb/Host/posix/HostInfoPosix.h:25
   static bool GetHostname(std::string &s);
+  static llvm::Optional<std::string> GetOSKernelDescription();
 
----------------
mgorny wrote:
> Ok, I must be missing something but I don't see the implementation of this in this patch.
I forgot to amend the implementation into the patch. Thanks for catching that.


================
Comment at: lldb/source/Target/Platform.cpp:495
 
 bool Platform::GetOSKernelDescription(std::string &s) {
+  if (IsHost()) {
----------------
mgorny wrote:
> I'd also change this prototype while at it ;-).
A lot of this code is only built/tested on some platforms, so I wanted to do that as a followup -- to reduce the number of moving parts. I also did GetOSBuildString in two parts, and both parts managed to break something.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112457



More information about the lldb-commits mailing list