aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-06-14 23:20:43 +0000
committerDouglas Gregor <dgregor@apple.com>2011-06-14 23:20:43 +0000
commit74da19fc3a52d7e3005eeb7a7833859da84fd12a (patch)
tree98fee591f242b262c56385e79d1e30aa63b7eb39 /lib/Driver/Tools.cpp
parent84862f6a0bdaad6f0648e10dfab6058cfa512864 (diff)
Introduce a -cc1-level option to turn off related result type
inference, to be used (only) by the Objective-C rewriter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index bc3ff6873b..0e85a9fd4f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1542,6 +1542,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fno_lax_vector_conversions))
CmdArgs.push_back("-fno-lax-vector-conversions");
+ // -fobjc-infer-related-result-type is the default, except in the Objective-C
+ // rewriter.
+ if (IsRewriter)
+ CmdArgs.push_back("-fno-objc-infer-related-result-type");
+
// Handle -fobjc-gc and -fobjc-gc-only. They are exclusive, and -fobjc-gc-only
// takes precedence.
const Arg *GCArg = Args.getLastArg(options::OPT_fobjc_gc_only);