forked from OSchip/llvm-project
Add a -fcxx-exceptions flag to clang -cc1. This controls the newly added CXXExceptions flag.
llvm-svn: 126300
This commit is contained in:
parent
6bbd268396
commit
33e56a047f
|
@ -418,10 +418,12 @@ def fblocks : Flag<"-fblocks">,
|
|||
def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">;
|
||||
def fexceptions : Flag<"-fexceptions">,
|
||||
HelpText<"Enable support for exception handling">;
|
||||
def fobjc_exceptions : Flag<"-fobjc-exceptions">,
|
||||
HelpText<"Enable Objective-C exceptions">;
|
||||
def fcxx_exceptions : Flag<"-fcxx-exceptions">,
|
||||
HelpText<"Enable C++ exceptions">;
|
||||
def fsjlj_exceptions : Flag<"-fsjlj-exceptions">,
|
||||
HelpText<"Use SjLj style exceptions">;
|
||||
def fobjc_exceptions : Flag<"-fobjc-exceptions">,
|
||||
HelpText<"Disable Objective-C exceptions">;
|
||||
def ffreestanding : Flag<"-ffreestanding">,
|
||||
HelpText<"Assert that the compilation takes place in a freestanding environment">;
|
||||
def fgnu_runtime : Flag<"-fgnu-runtime">,
|
||||
|
|
|
@ -585,10 +585,12 @@ static void LangOptsToArgs(const LangOptions &Opts,
|
|||
Res.push_back("-faltivec");
|
||||
if (Opts.Exceptions)
|
||||
Res.push_back("-fexceptions");
|
||||
if (Opts.ObjCExceptions)
|
||||
Res.push_back("-fobjc-exceptions");
|
||||
if (Opts.CXXExceptions)
|
||||
Res.push_back("-fcxx-exceptions");
|
||||
if (Opts.SjLjExceptions)
|
||||
Res.push_back("-fsjlj-exceptions");
|
||||
if (!Opts.ObjCExceptions)
|
||||
Res.push_back("-fno-objc-exceptions");
|
||||
if (!Opts.RTTI)
|
||||
Res.push_back("-fno-rtti");
|
||||
if (Opts.MSBitfields)
|
||||
|
@ -1456,6 +1458,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Opts.ThreadsafeStatics = 0;
|
||||
Opts.Exceptions = Args.hasArg(OPT_fexceptions);
|
||||
Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions);
|
||||
Opts.CXXExceptions = Args.hasArg(OPT_fcxx_exceptions);
|
||||
Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions);
|
||||
|
||||
Opts.RTTI = !Args.hasArg(OPT_fno_rtti);
|
||||
Opts.Blocks = Args.hasArg(OPT_fblocks);
|
||||
Opts.CharIsSigned = !Args.hasArg(OPT_fno_signed_char);
|
||||
|
@ -1484,8 +1489,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Opts.CatchUndefined = Args.hasArg(OPT_fcatch_undefined_behavior);
|
||||
Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls);
|
||||
Opts.PICLevel = Args.getLastArgIntValue(OPT_pic_level, 0, Diags);
|
||||
Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions);
|
||||
Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions);
|
||||
Opts.Static = Args.hasArg(OPT_static_define);
|
||||
Opts.DumpRecordLayouts = Args.hasArg(OPT_fdump_record_layouts);
|
||||
Opts.DumpVTableLayouts = Args.hasArg(OPT_fdump_vtable_layouts);
|
||||
|
|
Loading…
Reference in New Issue