[all-commits] [llvm/llvm-project] 0a39a9: Modernize and simplify HostInfo::GetOSKernelDescri...

Pavel Labath via All-commits all-commits at lists.llvm.org
Tue Oct 26 02:23:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a39a9c2cb43f93c82908cabdf73fdd4918a26e5
      https://github.com/llvm/llvm-project/commit/0a39a9c2cb43f93c82908cabdf73fdd4918a26e5
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2021-10-26 (Tue, 26 Oct 2021)

  Changed paths:
    M lldb/include/lldb/Host/freebsd/HostInfoFreeBSD.h
    M lldb/include/lldb/Host/linux/HostInfoLinux.h
    M lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
    M lldb/include/lldb/Host/netbsd/HostInfoNetBSD.h
    M lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h
    M lldb/include/lldb/Host/posix/HostInfoPosix.h
    M lldb/include/lldb/Host/windows/HostInfoWindows.h
    M lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
    M lldb/source/Host/linux/HostInfoLinux.cpp
    M lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
    M lldb/source/Host/netbsd/HostInfoNetBSD.cpp
    M lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
    M lldb/source/Host/posix/HostInfoPosix.cpp
    M lldb/source/Host/windows/HostInfoWindows.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
    M lldb/source/Target/Platform.cpp

  Log Message:
  -----------
  Modernize and simplify HostInfo::GetOSKernelDescription

Replace bool+by-ref argument with llvm::Optional, and move the common
implementation into HostInfoPOSIX. Based on my (simple) experiment,
the uname and the sysctl approach return the same value on MacOS, so
there's no need for a mac-specific implementation of this functionality.

Differential Revision: https://reviews.llvm.org/D112457




More information about the All-commits mailing list