From: Anders Carlsson Date: Sun, 21 Nov 2010 00:09:52 +0000 (+0000) Subject: Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4c2475961184a4bad6f6f087eeb1038bb784cad;p=clang Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index 6013c3be97..56ff905ad7 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -1931,6 +1931,7 @@ isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 0198f3468e..eeec267911 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -270,6 +270,7 @@ def fdiagnostics_parseable_fixits : Flag<"-fdiagnostics-parseable-fixits">, Grou def fdiagnostics_show_option : Flag<"-fdiagnostics-show-option">, Group; def fdiagnostics_show_category_EQ : Joined<"-fdiagnostics-show-category=">, Group; def fdollars_in_identifiers : Flag<"-fdollars-in-identifiers">, Group; +def felide_constructors : Flag<"-felide-constructors">, Group; def feliminate_unused_debug_symbols : Flag<"-feliminate-unused-debug-symbols">, Group; def femit_all_decls : Flag<"-femit-all-decls">, Group; def fencoding_EQ : Joined<"-fencoding=">, Group; @@ -325,6 +326,7 @@ def fno_constant_cfstrings : Flag<"-fno-constant-cfstrings">, Group; def fno_diagnostics_fixit_info : Flag<"-fno-diagnostics-fixit-info">, Group; def fno_diagnostics_show_option : Flag<"-fno-diagnostics-show-option">, Group; def fno_dollars_in_identifiers : Flag<"-fno-dollars-in-identifiers">, Group; +def fno_elide_constructors : Flag<"-fno-elide-constructors">, Group; def fno_eliminate_unused_debug_symbols : Flag<"-fno-eliminate-unused-debug-symbols">, Group; def fno_exceptions : Flag<"-fno-exceptions">, Group; def fno_finite_math_only : Flag<"-fno-finite-math-only">, Group; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 20977f239b..fafe1d2e15 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1347,6 +1347,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, false)) CmdArgs.push_back("-fno-access-control"); + // -felide-constructors is the default. + if (Args.hasFlag(options::OPT_fno_elide_constructors, + options::OPT_felide_constructors, + false)) + CmdArgs.push_back("-fno-elide-constructors"); + // -fexceptions=0 is default. if (!KernelOrKext && needsExceptions(Args, InputType, getToolChain().getTriple()))