dawn created this revision.
dawn added a reviewer: jasonmolenda.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.
Older OSX versions don't define NSOperatingSystemVersion, so building lldb gets:
../tools/lldb/tools/debugserver/source/MacOSX/MachProcess.mm:2032:5: error:
unknown type name 'NSOperatingSystemVersion'
NSOperatingSystemVersion vers = [[NSProcessInfo processInfo]
operatingSystemVersion];
^
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 this patch.
Repository:
rL LLVM
http://reviews.llvm.org/D12396
Files:
tools/debugserver/source/MacOSX/MachProcess.mm
Index: tools/debugserver/source/MacOSX/MachProcess.mm
===================================================================
--- tools/debugserver/source/MacOSX/MachProcess.mm
+++ tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
{
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 @@
success = true;
[pool drain];
+#endif
return success;
}
Index: tools/debugserver/source/MacOSX/MachProcess.mm
===================================================================
--- tools/debugserver/source/MacOSX/MachProcess.mm
+++ tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
{
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 @@
success = true;
[pool drain];
+#endif
return success;
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits