From d1e40d5389a4382cbebc97d54792f41ee0414af4 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sun, 2 Oct 2011 01:16:38 +0000 Subject: Make -fobjc-nonfragile-abi the -cc1 default, since it's the increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 671e3da295..5252ebadac 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -623,10 +623,8 @@ static void LangOptsToArgs(const LangOptions &Opts, Res.push_back("-fmsc-version=" + llvm::utostr(Opts.MSCVersion)); if (Opts.Borland) Res.push_back("-fborland-extensions"); - if (Opts.ObjCNonFragileABI) - Res.push_back("-fobjc-nonfragile-abi"); - if (Opts.ObjCNonFragileABI2) - Res.push_back("-fobjc-nonfragile-abi"); + if (!Opts.ObjCNonFragileABI) + Res.push_back("-fobjc-fragile-abi"); if (Opts.ObjCDefaultSynthProperties) Res.push_back("-fobjc-default-synthesize-properties"); // NoInline is implicit. @@ -1619,7 +1617,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.setGC(LangOptions::HybridGC); else if (Args.hasArg(OPT_fobjc_arc)) { Opts.ObjCAutoRefCount = 1; - if (!Args.hasArg(OPT_fobjc_nonfragile_abi)) + if (Args.hasArg(OPT_fobjc_fragile_abi)) Diags.Report(diag::err_arc_nonfragile_abi); } @@ -1723,7 +1721,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.NeXTRuntime = !Args.hasArg(OPT_fgnu_runtime); Opts.ObjCConstantStringClass = Args.getLastArgValue(OPT_fconstant_string_class); - Opts.ObjCNonFragileABI = Args.hasArg(OPT_fobjc_nonfragile_abi); + Opts.ObjCNonFragileABI = !Args.hasArg(OPT_fobjc_fragile_abi); if (Opts.ObjCNonFragileABI) Opts.ObjCNonFragileABI2 = true; Opts.ObjCDefaultSynthProperties = -- cgit v1.2.3-18-g5258