summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-04-09 18:20:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-04-09 18:20:28 +0000
commitba8ef296e4326dafad1fd94e4be421cc0150d5cd (patch)
tree885708d5a43e0f23a524c76faa9f18db2c16ce60
parent3521ae95805fca90993847c40f5309a4f1dfd235 (diff)
downloadbcm5719-llvm-ba8ef296e4326dafad1fd94e4be421cc0150d5cd.tar.gz
bcm5719-llvm-ba8ef296e4326dafad1fd94e4be421cc0150d5cd.zip
objective-c: Remove -fno-objc-default-synthesize-properties
as the driver option. // rdar://11209719 llvm-svn: 154331
-rw-r--r--clang/include/clang/Driver/Options.td2
-rw-r--r--clang/lib/Driver/Tools.cpp5
-rw-r--r--clang/test/Driver/no-objc-default-synthesize-properties.m9
3 files changed, 11 insertions, 5 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 1b6b20c6b31..3f017f21af9 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -432,8 +432,6 @@ def fno_modules : Flag <"-fno-modules">, Group<f_Group>, Flags<[NoForward]>;
def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group<f_Group>;
def fno_ms_compatibility : Flag<"-fno-ms-compatibility">, Group<f_Group>;
def fno_delayed_template_parsing : Flag<"-fno-delayed-template-parsing">, Group<f_Group>;
-def fno_objc_default_synthesize_properties
- : Flag<"-fno-objc-default-synthesize-properties">, Group<f_Group>;
def fno_objc_exceptions: Flag<"-fno-objc-exceptions">, Group<f_Group>;
def fno_objc_legacy_dispatch : Flag<"-fno-objc-legacy-dispatch">, Group<f_Group>;
def fno_omit_frame_pointer : Flag<"-fno-omit-frame-pointer">, Group<f_Group>;
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 8093d2f6dfd..4744c6ad9f0 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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/clang/test/Driver/no-objc-default-synthesize-properties.m b/clang/test/Driver/no-objc-default-synthesize-properties.m
new file mode 100644
index 00000000000..00d78e36953
--- /dev/null
+++ b/clang/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'
OpenPOWER on IntegriCloud