Modernize and simplify HostInfo::GetOSKernelDescription
authorPavel Labath <pavel@labath.sk>
Mon, 25 Oct 2021 14:44:12 +0000 (16:44 +0200)
committerPavel Labath <pavel@labath.sk>
Tue, 26 Oct 2021 09:17:02 +0000 (11:17 +0200)
commit0a39a9c2cb43f93c82908cabdf73fdd4918a26e5
treea1626b311bcd27f3cddd279d09c531499eef94a3
parent11a8423dab38293b75295bbb6a245bc8a829860f
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
16 files changed:
lldb/include/lldb/Host/freebsd/HostInfoFreeBSD.h
lldb/include/lldb/Host/linux/HostInfoLinux.h
lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
lldb/include/lldb/Host/netbsd/HostInfoNetBSD.h
lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h
lldb/include/lldb/Host/posix/HostInfoPosix.h
lldb/include/lldb/Host/windows/HostInfoWindows.h
lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
lldb/source/Host/linux/HostInfoLinux.cpp
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
lldb/source/Host/netbsd/HostInfoNetBSD.cpp
lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
lldb/source/Host/posix/HostInfoPosix.cpp
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Target/Platform.cpp