Skip to content

Commit

Permalink
Remove ARC boilerplate in Crashpad
Browse files Browse the repository at this point in the history
ARC is now enabled by default, so there’s no need to enforce it
against files being put into non-ARC targets.

Bug: chromium:1468376
Change-Id: I58bbb4d1736293a6e9977954ce932dcfe2bafa54
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750419
Reviewed-by: Mark Mentovai <[email protected]>
Commit-Queue: Mark Mentovai <[email protected]>
  • Loading branch information
Avi Drissman authored and Crashpad LUCI CQ committed Aug 3, 2023
1 parent ce7f0f1 commit 617429d
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 72 deletions.
4 changes: 0 additions & 4 deletions client/crash_report_database_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
#include "util/ios/scoped_background_task.h"
#endif // BUILDFLAG(IS_IOS)

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {

namespace {
Expand Down
4 changes: 0 additions & 4 deletions client/crashpad_client_ios_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
#include "testing/platform_test.h"
#include "util/thread/thread.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace test {
namespace {
Expand Down
4 changes: 0 additions & 4 deletions client/ios_handler/exception_processor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
#include "client/annotation.h"
#include "client/simulate_crash_ios.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {

namespace {
Expand Down
4 changes: 0 additions & 4 deletions client/ios_handler/exception_processor_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#include "gtest/gtest.h"
#include "testing/platform_test.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace test {
namespace {
Expand Down
4 changes: 0 additions & 4 deletions test/ios/cptest_google_test_runner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#include "base/check.h"
#import "test/ios/cptest_google_test_runner_delegate.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

@interface CPTestGoogleTestRunner : XCTestCase
@end

Expand Down
4 changes: 0 additions & 4 deletions test/ios/crash_type_xctest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
#include "util/mach/exception_types.h"
#include "util/mach/mach_extensions.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

@interface CPTestTestCase : XCTestCase {
XCUIApplication* app_;
CPTestSharedObject* rootObject_;
Expand Down
4 changes: 0 additions & 4 deletions test/ios/google_test_setup.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#include "gtest/gtest.h"
#include "test/ios/cptest_google_test_runner_delegate.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

@interface UIApplication (Testing)
- (void)_terminateWithStatus:(int)status;
@end
Expand Down
4 changes: 0 additions & 4 deletions test/ios/host/cptest_application_delegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
#include "util/ios/raw_logging.h"
#include "util/thread/thread.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

using OperationStatus = crashpad::CrashReportDatabase::OperationStatus;
using Report = crashpad::CrashReportDatabase::Report;

Expand Down
4 changes: 0 additions & 4 deletions test/ios/host/cptest_crash_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

#import "test/ios/host/cptest_crash_view_controller.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

@implementation CPTestCrashViewController

- (void)loadView {
Expand Down
4 changes: 0 additions & 4 deletions test/ios/host/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#import "test/ios/host/cptest_application_delegate.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

int main(int argc, char* argv[]) {
NSString* appDelegateClassName;
@autoreleasepool {
Expand Down
4 changes: 0 additions & 4 deletions tools/mac/on_demand_service_tool.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
#include "util/mac/service_management.h"
#include "util/stdlib/objc.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace {

Expand Down
4 changes: 0 additions & 4 deletions util/ios/ios_system_data_collector.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
#include "base/strings/sys_string_conversions.h"
#include "build/build_config.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace {

std::string ReadStringSysctlByName(const char* name) {
Expand Down
4 changes: 0 additions & 4 deletions util/ios/scoped_background_task.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#import <Foundation/Foundation.h>

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace internal {

Expand Down
4 changes: 0 additions & 4 deletions util/mac/launchd.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#include "base/strings/sys_string_conversions.h"
#include "util/misc/implicit_cast.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {

launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
Expand Down
4 changes: 0 additions & 4 deletions util/mac/launchd_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
#include "gtest/gtest.h"
#include "util/stdlib/objc.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace test {
namespace {
Expand Down
4 changes: 0 additions & 4 deletions util/mac/mac_util_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
#include "base/strings/stringprintf.h"
#include "gtest/gtest.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace test {
namespace {
Expand Down
4 changes: 0 additions & 4 deletions util/mac/service_management_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
#include "util/posix/process_info.h"
#include "util/stdlib/objc.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace crashpad {
namespace test {
namespace {
Expand Down
4 changes: 0 additions & 4 deletions util/net/http_transport_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
#include "util/misc/metrics.h"
#include "util/net/http_body.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

// An implementation of NSInputStream that reads from a
// crashpad::HTTPBodyStream.
@interface CrashpadHTTPBodyStreamTransport : NSInputStream {
Expand Down

0 comments on commit 617429d

Please sign in to comment.