diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-14 23:20:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-14 23:20:43 +0000 |
commit | 74da19fc3a52d7e3005eeb7a7833859da84fd12a (patch) | |
tree | 98fee591f242b262c56385e79d1e30aa63b7eb39 /lib/Frontend/CompilerInvocation.cpp | |
parent | 84862f6a0bdaad6f0648e10dfab6058cfa512864 (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/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index b8b5011bbf..c929b4926d 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -670,6 +670,9 @@ static void LangOptsToArgs(const LangOptions &Opts, Res.push_back("-fobjc-gc-only"); } } + if (!Opts.ObjCInferRelatedResultType) + Res.push_back("-fno-objc-infer-related-result-type"); + if (Opts.AppleKext) Res.push_back("-fapple-kext"); @@ -1485,6 +1488,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, else if (Args.hasArg(OPT_fobjc_gc)) Opts.setGCMode(LangOptions::HybridGC); + if (Args.hasArg(OPT_fno_objc_infer_related_result_type)) + Opts.ObjCInferRelatedResultType = 0; + if (Args.hasArg(OPT_fapple_kext)) { if (!Opts.CPlusPlus) Diags.Report(diag::warn_c_kext); |