diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-13 16:42:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-13 16:42:53 +0000 |
commit | 4c4efee6d3113f20b41efaeec08934332d2ea40e (patch) | |
tree | 803dec660a3ed909d6793568be9895dd2b751040 /lib | |
parent | 85269fcfc8639d7137b1c574c4825f4678ce245b (diff) |
Eliminate the -f[no]objc-infer-related-result-type flags; there's no
reason to allow the user to control these semantics through a flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/Tools.cpp | 6 | ||||
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 | ||||
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 2 | ||||
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 1 |
5 files changed, 1 insertions, 17 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 8cd7adc42e..bc3ff6873b 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1542,12 +1542,6 @@ 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. - if (Args.hasFlag(options::OPT_fobjc_infer_related_result_type, - options::OPT_fno_objc_infer_related_result_type, - /*Default=*/true)) - CmdArgs.push_back("-fobjc-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); diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 536512a121..b8b5011bbf 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -670,9 +670,6 @@ static void LangOptsToArgs(const LangOptions &Opts, Res.push_back("-fobjc-gc-only"); } } - if (Opts.ObjCInferRelatedResultType) - Res.push_back("-fobjc-infer-related-result-type"); - if (Opts.AppleKext) Res.push_back("-fapple-kext"); @@ -1488,9 +1485,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, else if (Args.hasArg(OPT_fobjc_gc)) Opts.setGCMode(LangOptions::HybridGC); - if (Args.hasArg(OPT_fobjc_infer_related_result_type)) - Opts.ObjCInferRelatedResultType = 1; - if (Args.hasArg(OPT_fapple_kext)) { if (!Opts.CPlusPlus) Diags.Report(diag::warn_c_kext); diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index bfa2ef45d0..0b032f8701 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2112,8 +2112,7 @@ Decl *Sema::ActOnMethodDeclaration( mergeObjCMethodDecls(ObjCMethod, InterfaceMD); } - if (!ObjCMethod->hasRelatedResultType() && - getLangOptions().ObjCInferRelatedResultType) { + if (!ObjCMethod->hasRelatedResultType()) { bool InferRelatedResultType = false; switch (ObjCMethod->getMethodFamily()) { case OMF_None: diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 8fb20d22b7..3c3993f412 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -92,7 +92,6 @@ PCHValidator::ReadLanguageOptions(const LangOptions &LangOpts) { PARSE_LANGOPT_IMPORTANT(AppleKext, diag::warn_pch_apple_kext); PARSE_LANGOPT_IMPORTANT(ObjCDefaultSynthProperties, diag::warn_pch_objc_auto_properties); - PARSE_LANGOPT_BENIGN(ObjCInferRelatedResultType) PARSE_LANGOPT_IMPORTANT(NoConstantCFStrings, diag::warn_pch_no_constant_cfstrings); PARSE_LANGOPT_BENIGN(PascalStrings); @@ -2935,7 +2934,6 @@ bool ASTReader::ParseLanguageOptions( PARSE_LANGOPT(ObjCNonFragileABI2); PARSE_LANGOPT(AppleKext); PARSE_LANGOPT(ObjCDefaultSynthProperties); - PARSE_LANGOPT(ObjCInferRelatedResultType); PARSE_LANGOPT(NoConstantCFStrings); PARSE_LANGOPT(PascalStrings); PARSE_LANGOPT(WritableStrings); diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index ba9032e0d3..194d6c31cf 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -1050,7 +1050,6 @@ void ASTWriter::WriteLanguageOptions(const LangOptions &LangOpts) { Record.push_back(LangOpts.AppleKext); // Apple's kernel extensions ABI Record.push_back(LangOpts.ObjCDefaultSynthProperties); // Objective-C auto-synthesized // properties enabled. - Record.push_back(LangOpts.ObjCInferRelatedResultType); Record.push_back(LangOpts.NoConstantCFStrings); // non cfstring generation enabled.. Record.push_back(LangOpts.PascalStrings); // Allow Pascal strings |