[Lldb-commits] [PATCH] D83582: Fix nesting of #ifdef

2020-07-10 Thread Adrian Prantl via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG851cc2f8f60a: Fix nesting of #ifdef (authored by aprantl).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83582/new/

https://reviews.llvm.org/D83582

Files:
  lldb/tools/debugserver/source/MacOSX/MachProcess.mm


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -780,11 +780,11 @@
 if (DeploymentInfo deployment_info = GetDeploymentInfo(lc, load_cmds_p)) {
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
-// If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
-// If we are running on Intel macOS, it is safe to assume
-// this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
+  // If dyld doesn't return a platform, use a heuristic.
+  // If we are running on Intel macOS, it is safe to assume
+  // this is really a back-deploying simulator binary.
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -780,11 +780,11 @@
 if (DeploymentInfo deployment_info = GetDeploymentInfo(lc, load_cmds_p)) {
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
-// If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
-// If we are running on Intel macOS, it is safe to assume
-// this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
+  // If dyld doesn't return a platform, use a heuristic.
+  // If we are running on Intel macOS, it is safe to assume
+  // this is really a back-deploying simulator binary.
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D83582: Fix nesting of #ifdef

2020-07-10 Thread Davide Italiano via Phabricator via lldb-commits
davide accepted this revision.
davide added a comment.
This revision is now accepted and ready to land.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83582/new/

https://reviews.llvm.org/D83582



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D83582: Fix nesting of #ifdef

2020-07-10 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 277122.
aprantl added a comment.

Also move comment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83582/new/

https://reviews.llvm.org/D83582

Files:
  lldb/tools/debugserver/source/MacOSX/MachProcess.mm


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -780,11 +780,11 @@
 if (DeploymentInfo deployment_info = GetDeploymentInfo(lc, load_cmds_p)) {
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
-// If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
-// If we are running on Intel macOS, it is safe to assume
-// this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
+  // If dyld doesn't return a platform, use a heuristic.
+  // If we are running on Intel macOS, it is safe to assume
+  // this is really a back-deploying simulator binary.
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -780,11 +780,11 @@
 if (DeploymentInfo deployment_info = GetDeploymentInfo(lc, load_cmds_p)) {
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
-// If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
-// If we are running on Intel macOS, it is safe to assume
-// this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
+  // If dyld doesn't return a platform, use a heuristic.
+  // If we are running on Intel macOS, it is safe to assume
+  // this is really a back-deploying simulator binary.
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D83582: Fix nesting of #ifdef

2020-07-10 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl created this revision.
aprantl added a reviewer: friss.
Herald added a subscriber: kristof.beyls.

This fixes a compile error when building for an arm64 host.


https://reviews.llvm.org/D83582

Files:
  lldb/tools/debugserver/source/MacOSX/MachProcess.mm


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -781,10 +781,10 @@
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
 // If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
 // If we are running on Intel macOS, it is safe to assume
 // this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }


Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -781,10 +781,10 @@
   // Simulator support. If the platform is ambiguous, use the dyld info.
   if (deployment_info.maybe_simulator) {
 // If dyld doesn't return a platform, use a heuristic.
-#if (defined(__x86_64__) || defined(__i386__))
 // If we are running on Intel macOS, it is safe to assume
 // this is really a back-deploying simulator binary.
 if (deployment_info.maybe_simulator) {
+#if (defined(__x86_64__) || defined(__i386__))
   switch (deployment_info.platform) {
   case PLATFORM_IOS:
 deployment_info.platform = PLATFORM_IOSSIMULATOR;
@@ -797,12 +797,12 @@
 break;
   }
 #else
-// On an Apple Silicon macOS host, there is no
-// ambiguity. The only binaries that use legacy load
-// commands are back-deploying native iOS binaries. All
-// simulator binaries use the newer, unambiguous
-// LC_BUILD_VERSION load commands.
-deployment_info.maybe_simulator = false;
+  // On an Apple Silicon macOS host, there is no
+  // ambiguity. The only binaries that use legacy load
+  // commands are back-deploying native iOS binaries. All
+  // simulator binaries use the newer, unambiguous
+  // LC_BUILD_VERSION load commands.
+  deployment_info.maybe_simulator = false;
 #endif
 }
   }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits