From: Fariborz Jahanian Date: Mon, 9 Apr 2012 18:20:28 +0000 (+0000) Subject: objective-c: Remove -fno-objc-default-synthesize-properties X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e52e2e6f4840c2fa8f7e6289cab976e2c8d2fdc0;p=clang objective-c: Remove -fno-objc-default-synthesize-properties as the driver option. // rdar://11209719 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154331 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 1b6b20c6b3..3f017f21af 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -432,8 +432,6 @@ def fno_modules : Flag <"-fno-modules">, Group, Flags<[NoForward]>; def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group; def fno_ms_compatibility : Flag<"-fno-ms-compatibility">, Group; def fno_delayed_template_parsing : Flag<"-fno-delayed-template-parsing">, Group; -def fno_objc_default_synthesize_properties - : Flag<"-fno-objc-default-synthesize-properties">, Group; def fno_objc_exceptions: Flag<"-fno-objc-exceptions">, Group; def fno_objc_legacy_dispatch : Flag<"-fno-objc-legacy-dispatch">, Group; def fno_omit_frame_pointer : Flag<"-fno-omit-frame-pointer">, Group; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 8093d2f6df..4744c6ad9f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2394,9 +2394,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // -fobjc-default-synthesize-properties=1 is default. This only has an effect // if the nonfragile objc abi is used. - if (Args.hasFlag(options::OPT_fobjc_default_synthesize_properties, - options::OPT_fno_objc_default_synthesize_properties, - getToolChain().IsObjCDefaultSynthPropertiesDefault())) { + if (Args.hasArg(options::OPT_fobjc_default_synthesize_properties) || + getToolChain().IsObjCDefaultSynthPropertiesDefault()) { CmdArgs.push_back("-fobjc-default-synthesize-properties"); } diff --git a/test/Driver/no-objc-default-synthesize-properties.m b/test/Driver/no-objc-default-synthesize-properties.m new file mode 100644 index 0000000000..00d78e3695 --- /dev/null +++ b/test/Driver/no-objc-default-synthesize-properties.m @@ -0,0 +1,9 @@ +// RUN: %clang -fsyntax-only -fno-objc-default-synthesize-properties %s 2>&1 | FileCheck %s + +@interface I +@property int P; +@end + +@implementation I +@end +// CHECK: warning: argument unused during compilation: '-fno-objc-default-synthesize-properties'