[Lldb-commits] [lldb] r246138 - Fix lldb build on older OSX versions after svn commit r244716

Dawn Perchik via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 20:42:56 PDT 2015


Author: dperchik
Date: Wed Aug 26 22:42:56 2015
New Revision: 246138

URL: http://llvm.org/viewvc/llvm-project?rev=246138&view=rev
Log:
Fix lldb build on older OSX versions after svn commit r244716

Older OSX versions don't define NSOperatingSystemVersion, so building
lldb gets: error: unknown type name 'NSOperatingSystemVersion'
This patch fixes the build by having GetOSVersionNumbers return false if
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000, causing lldb to
behave the same as it did before the commit.

Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12396

Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=246138&r1=246137&r2=246138&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Wed Aug 26 22:42:56 2015
@@ -2027,6 +2027,7 @@ MachProcess::GetOSVersionNumbers (uint64
 {
     bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
     NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] operatingSystemVersion];
@@ -2040,6 +2041,7 @@ MachProcess::GetOSVersionNumbers (uint64
     success = true;
 
     [pool drain];
+#endif
 
     return success;
 }




More information about the lldb-commits mailing list