summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-18 15:02:23 +0000
committerPavel Labath <labath@google.com>2018-06-18 15:02:23 +0000
commit2272c4811f8d2c56612d483c2546f053e7ea61cc (patch)
treec591a7a541563c323f1b4f8697a8cd7b8ea53f8c /lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
parent13684d840019282ed720cd52a9a0e6c3485d3a76 (diff)
downloadbcm5719-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/MacOSX/PlatformDarwin.h')
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
index c04318e98ca..3ad29ec1a0b 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
@@ -69,8 +69,8 @@ public:
void CalculateTrapHandlerSymbolNames() override;
- bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update,
- lldb_private::Process *process = nullptr) override;
+ llvm::VersionTuple
+ GetOSVersion(lldb_private::Process *process = nullptr) override;
bool SupportsModules() override { return true; }
@@ -82,7 +82,7 @@ public:
lldb_private::Status
LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
- static std::tuple<uint32_t, uint32_t, uint32_t, llvm::StringRef>
+ static std::tuple<llvm::VersionTuple, llvm::StringRef>
ParseVersionBuildDir(llvm::StringRef str);
protected:
@@ -101,8 +101,7 @@ protected:
iPhoneOS,
};
- static bool SDKSupportsModules(SDKType sdk_type, uint32_t major,
- uint32_t minor, uint32_t micro);
+ static bool SDKSupportsModules(SDKType sdk_type, llvm::VersionTuple version);
static bool SDKSupportsModules(SDKType desired_type,
const lldb_private::FileSpec &sdk_path);
OpenPOWER on IntegriCloud