diff options
author | Pavel Labath <labath@google.com> | 2018-06-18 15:02:23 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-06-18 15:02:23 +0000 |
commit | 2272c4811f8d2c56612d483c2546f053e7ea61cc (patch) | |
tree | c591a7a541563c323f1b4f8697a8cd7b8ea53f8c /lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp | |
parent | 13684d840019282ed720cd52a9a0e6c3485d3a76 (diff) | |
download | bcm5719-llvm-2272c4811f8d2c56612d483c2546f053e7ea61cc.tar.gz bcm5719-llvm-2272c4811f8d2c56612d483c2546f053e7ea61cc.zip |
Use llvm::VersionTuple instead of manual version marshalling
Summary:
This has multiple advantages:
- we need only one function argument/instance variable instead of three
- no need to default initialize variables
- no custom parsing code
- VersionTuple has comparison operators, which makes version comparisons much
simpler
Reviewers: zturner, friss, clayborg, jingham
Subscribers: emaste, lldb-commits
Differential Revision: https://reviews.llvm.org/D47889
llvm-svn: 334950
Diffstat (limited to 'lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp index d3f43399a0e..9ac1638d27a 100644 --- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -653,9 +653,10 @@ bool PlatformPOSIX::SetRemoteWorkingDirectory(const FileSpec &working_dir) { } bool PlatformPOSIX::GetRemoteOSVersion() { - if (m_remote_platform_sp) - return m_remote_platform_sp->GetOSVersion( - m_major_os_version, m_minor_os_version, m_update_os_version); + if (m_remote_platform_sp) { + m_os_version = m_remote_platform_sp->GetOSVersion(); + return !m_os_version.empty(); + } return false; } |