aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver')
-rw-r--r--lib/Driver/ToolChains.h6
-rw-r--r--lib/Driver/Tools.cpp7
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 04288a2ee0..33b8053453 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -176,6 +176,12 @@ public:
getTriple().getArch() == llvm::Triple::x86_64);
#endif
}
+
+ virtual bool IsObjCDefaultSynthPropertiesDefault() const {
+ // Always allow default synthesized properties on Darwin.
+ return true;
+ }
+
virtual bool IsObjCNonFragileABIDefault() const {
// Non-fragile ABI is default for everything but i386.
return getTriple().getArch() != llvm::Triple::x86;
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 9df276d9c2..cee00edd2d 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1484,6 +1484,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fobjc-dispatch-method=non-legacy");
}
}
+
+ // -fobjc-default-synthesize-properties=0 is default.
+ if (Args.hasFlag(options::OPT_fobjc_default_synthesize_properties,
+ options::OPT_fno_objc_default_synthesize_properties,
+ getToolChain().IsObjCDefaultSynthPropertiesDefault())) {
+ CmdArgs.push_back("-fobjc-default-synthesize-properties");
+ }
}
if (!Args.hasFlag(options::OPT_fassume_sane_operator_new,