[iOS] Clean up some includes in client/ and snapshot/

Remove some unused headers and move other includes to the .cc files. In
addition to IWYU being good practice, it also allows us to remove some
util/mach/ includes that will make landing tvOS support code easier.

Bug: chromium:405140658
Change-Id: Iec5690bb8741c2afb8726693200576f128caca42
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6394982
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Raphael Kubo da Costa <kubo@igalia.com>
This commit is contained in:
Raphael Kubo da Costa 2025-03-26 17:27:01 +01:00 committed by Crashpad LUCI CQ
parent 421b4a975a
commit a5ef9869bc
10 changed files with 4 additions and 18 deletions

View File

@ -18,11 +18,9 @@
#include <unistd.h>
#include <atomic>
#include <ios>
#include <iterator>
#include "base/apple/mach_logging.h"
#include "base/apple/scoped_mach_port.h"
#include "base/logging.h"
#include "client/ios_handler/exception_processor.h"
#include "client/ios_handler/in_process_handler.h"

View File

@ -33,6 +33,7 @@
#include "snapshot/ios/process_snapshot_ios_intermediate_dump.h"
#include "util/ios/ios_intermediate_dump_writer.h"
#include "util/ios/ios_system_data_collector.h"
#include "util/mach/mach_extensions.h"
#include "util/misc/capture_context.h"
#include "util/misc/initialization_state_dcheck.h"

View File

@ -17,7 +17,6 @@
#include <mach-o/loader.h>
#include <mach/mach.h>
#include <signal.h>
#include <sys/types.h>
#include <map>

View File

@ -25,7 +25,6 @@
#include "snapshot/exception_snapshot.h"
#include "snapshot/ios/memory_snapshot_ios_intermediate_dump.h"
#include "util/ios/ios_intermediate_dump_map.h"
#include "util/mach/mach_extensions.h"
#include "util/misc/initialization_state_dcheck.h"
namespace crashpad {

View File

@ -14,6 +14,7 @@
#include "snapshot/ios/intermediate_dump_reader_util.h"
#include "base/logging.h"
#include "util/ios/ios_intermediate_dump_data.h"
#include "util/ios/ios_intermediate_dump_map.h"
#include "util/misc/metrics.h"

View File

@ -14,7 +14,6 @@
#include <ostream>
#include "base/logging.h"
#include "util/ios/ios_intermediate_dump_data.h"
#include "util/ios/ios_intermediate_dump_map.h"

View File

@ -15,10 +15,11 @@
#ifndef CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_MEMORY_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
#define CRASHPAD_SNAPSHOT_IOS_INTERMEDIATE_DUMP_MEMORY_SNAPSHOT_IOS_INTERMEDIATEDUMP_H_
#include <mach/mach.h>
#include <vector>
#include "snapshot/memory_snapshot.h"
#include "util/misc/address_types.h"
#include "util/misc/initialization_state_dcheck.h"
namespace crashpad {

View File

@ -23,7 +23,6 @@
#include <string>
#include <vector>
#include "snapshot/crashpad_info_client_options.h"
#include "snapshot/ios/memory_snapshot_ios_intermediate_dump.h"
#include "snapshot/module_snapshot.h"
#include "util/ios/ios_intermediate_dump_map.h"

View File

@ -15,23 +15,13 @@
#include "snapshot/ios/system_snapshot_ios_intermediate_dump.h"
#include <mach/mach.h>
#include <stddef.h>
#include <sys/sysctl.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <algorithm>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "snapshot/cpu_context.h"
#include "snapshot/ios/intermediate_dump_reader_util.h"
#include "snapshot/posix/timezone.h"
#include "util/ios/ios_intermediate_dump_data.h"
#include "util/mac/mac_util.h"
#include "util/numeric/in_range_cast.h"
namespace crashpad {

View File

@ -21,7 +21,6 @@
#include "snapshot/system_snapshot.h"
#include "util/ios/ios_intermediate_dump_map.h"
#include "util/ios/ios_system_data_collector.h"
#include "util/misc/initialization_state_dcheck.h"
namespace crashpad {