[Lldb-commits] [lldb] r334955 - Fix macosx build broken by the VersionTuple refactor
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 18 09:10:20 PDT 2018
Author: labath
Date: Mon Jun 18 09:10:20 2018
New Revision: 334955
URL: http://llvm.org/viewvc/llvm-project?rev=334955&view=rev
Log:
Fix macosx build broken by the VersionTuple refactor
I actually did check that macos builds before committing, but this error
was in conditionally compiled code that did not seem to be used on my
machine.
I also fix a typo in the previous speculative NetBSD patch.
Modified:
lldb/trunk/source/Host/macosx/objcxx/Host.mm
lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp
Modified: lldb/trunk/source/Host/macosx/objcxx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/objcxx/Host.mm?rev=334955&r1=334954&r2=334955&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/objcxx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/objcxx/Host.mm Mon Jun 18 09:10:20 2018
@@ -851,14 +851,11 @@ static short GetPosixspawnFlags(const Pr
if (g_use_close_on_exec_flag == eLazyBoolCalculate) {
g_use_close_on_exec_flag = eLazyBoolNo;
- uint32_t major, minor, update;
- if (HostInfo::GetOSVersion(major, minor, update)) {
+ llvm::VersionTuple version = HostInfo::GetOSVersion();
+ if (version > llvm::VersionTuple(10, 7)) {
// Kernel panic if we use the POSIX_SPAWN_CLOEXEC_DEFAULT on 10.7 or
// earlier
- if (major > 10 || (major == 10 && minor > 7)) {
- // Only enable for 10.8 and later OS versions
- g_use_close_on_exec_flag = eLazyBoolYes;
- }
+ g_use_close_on_exec_flag = eLazyBoolYes;
}
}
#else
Modified: lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp?rev=334955&r1=334954&r2=334955&view=diff
==============================================================================
--- lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp (original)
+++ lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp Mon Jun 18 09:10:20 2018
@@ -26,7 +26,7 @@ llvm::VersionTuple HostInfoNetBSD::GetOS
::memset(&un, 0, sizeof(un));
if (::uname(&un) < 0)
- return VersionTuple();
+ return llvm::VersionTuple();
/* Accept versions like 7.99.21 and 6.1_STABLE */
uint32_t major, minor, update;
More information about the lldb-commits
mailing list