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 | a860e6aebcdc7fd7edfe9aaa302d1e64fe6e493e (patch) | |
tree | d7a4e92baeb65d32011b5c5a9982dcdc60b4558a /clang/lib/Frontend | |
parent | 192ed0b7eebcdf7905f595591496c22ced5a7042 (diff) | |
download | bcm5719-llvm-a860e6aebcdc7fd7edfe9aaa302d1e64fe6e493e.tar.gz bcm5719-llvm-a860e6aebcdc7fd7edfe9aaa302d1e64fe6e493e.zip |
Introduce a -cc1-level option to turn off related result type
inference, to be used (only) by the Objective-C rewriter.
llvm-svn: 133025
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index b8b5011bbfa..c929b4926d8 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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); |