Add -fno-function-sections and -fno-data-sections. Since

-f{function,data}-sections had no tests at all, add some, and verify that the
-fno variants work as well.

llvm-svn: 192413
This commit is contained in:
Nick Lewycky
2013-10-11 03:35:10 +00:00
parent 609dd6671d
commit 3a410fe085
3 changed files with 39 additions and 6 deletions

View File

@@ -398,8 +398,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.TrapFuncName = Args.getLastArgValue(OPT_ftrap_function_EQ);
Opts.UseInitArray = Args.hasArg(OPT_fuse_init_array);
Opts.FunctionSections = Args.hasArg(OPT_ffunction_sections);
Opts.DataSections = Args.hasArg(OPT_fdata_sections);
Opts.FunctionSections = Args.hasFlag(OPT_ffunction_sections,
OPT_fno_function_sections, false);
Opts.DataSections = Args.hasFlag(OPT_fdata_sections,
OPT_fno_data_sections, false);
Opts.VectorizeBB = Args.hasArg(OPT_vectorize_slp_aggressive);
Opts.VectorizeLoop = Args.hasArg(OPT_vectorize_loops);