[llvm-branch-commits] [lldb] r351536 - Merging r351504:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 18 01:57:06 PST 2019
Author: hans
Date: Fri Jan 18 01:57:06 2019
New Revision: 351536
URL: http://llvm.org/viewvc/llvm-project?rev=351536&view=rev
Log:
Merging r351504:
------------------------------------------------------------------------
r351504 | brad | 2019-01-18 02:36:58 +0100 (Fri, 18 Jan 2019) | 2 lines
Use llvm::VersionTuple instead of manual version marshalling
------------------------------------------------------------------------
Modified:
lldb/branches/release_80/ (props changed)
lldb/branches/release_80/include/lldb/Host/openbsd/HostInfoOpenBSD.h
lldb/branches/release_80/source/Host/openbsd/HostInfoOpenBSD.cpp
Propchange: lldb/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 18 01:57:06 2019
@@ -1,3 +1,3 @@
/lldb/branches/apple/python-GIL:156467-162159
/lldb/branches/iohandler:198360-200250
-/lldb/trunk:351327
+/lldb/trunk:351327,351504
Modified: lldb/branches/release_80/include/lldb/Host/openbsd/HostInfoOpenBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_80/include/lldb/Host/openbsd/HostInfoOpenBSD.h?rev=351536&r1=351535&r2=351536&view=diff
==============================================================================
--- lldb/branches/release_80/include/lldb/Host/openbsd/HostInfoOpenBSD.h (original)
+++ lldb/branches/release_80/include/lldb/Host/openbsd/HostInfoOpenBSD.h Fri Jan 18 01:57:06 2019
@@ -12,12 +12,13 @@
#include "lldb/Host/posix/HostInfoPosix.h"
#include "lldb/Utility/FileSpec.h"
+#include "llvm/Support/VersionTuple.h"
namespace lldb_private {
class HostInfoOpenBSD : public HostInfoPosix {
public:
- static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
+ static llvm::VersionTuple GetOSVersion();
static bool GetOSBuildString(std::string &s);
static bool GetOSKernelDescription(std::string &s);
static FileSpec GetProgramFileSpec();
Modified: lldb/branches/release_80/source/Host/openbsd/HostInfoOpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_80/source/Host/openbsd/HostInfoOpenBSD.cpp?rev=351536&r1=351535&r2=351536&view=diff
==============================================================================
--- lldb/branches/release_80/source/Host/openbsd/HostInfoOpenBSD.cpp (original)
+++ lldb/branches/release_80/source/Host/openbsd/HostInfoOpenBSD.cpp Fri Jan 18 01:57:06 2019
@@ -17,16 +17,17 @@
using namespace lldb_private;
-bool HostInfoOpenBSD::GetOSVersion(uint32_t &major, uint32_t &minor,
- uint32_t &update) {
+llvm::VersionTuple HostInfoOpenBSD::GetOSVersion() {
struct utsname un;
::memset(&un, 0, sizeof(utsname));
if (uname(&un) < 0)
- return false;
+ return llvm::VersionTuple();
- int status = sscanf(un.release, "%u.%u", &major, &minor);
- return status == 2;
+ unsigned major, minor;
+ if (2 == sscanf(un.release, "%u.%u", &major, &minor))
+ return llvm::VersionTuple(major, minor);
+ return llvm::VersionTuple();
}
bool HostInfoOpenBSD::GetOSBuildString(std::string &s) {
More information about the llvm-branch-commits
mailing list