Introduce a -cc1-level option to turn off related result type

inference, to be used (only) by the Objective-C rewriter.

llvm-svn: 133025
This commit is contained in:
Douglas Gregor
2011-06-14 23:20:43 +00:00
parent 192ed0b7ee
commit a860e6aebc
8 changed files with 24 additions and 3 deletions

View File

@@ -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);