[llvm-branch-commits] [clang] b6ba598 - [clang][cli] Port getAllArgumentValues to the marshalling infrastructure
Jan Svoboda via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 7 03:07:12 PST 2021
Author: Jan Svoboda
Date: 2021-01-07T12:02:07+01:00
New Revision: b6ba59830796b4efad69a3d3c1fae56c20029f30
URL: https://github.com/llvm/llvm-project/commit/b6ba59830796b4efad69a3d3c1fae56c20029f30
DIFF: https://github.com/llvm/llvm-project/commit/b6ba59830796b4efad69a3d3c1fae56c20029f30.diff
LOG: [clang][cli] Port getAllArgumentValues to the marshalling infrastructure
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D93679
Added:
Modified:
clang/include/clang/Driver/Options.td
clang/lib/Frontend/CompilerInvocation.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index ffa7fbd84df93..6585fd1ceb013 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -679,7 +679,8 @@ def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>,
def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>,
HelpText<"Specify name of main file output to quote in depfile">;
def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>,
- HelpText<"Specify name of main file output in depfile">;
+ HelpText<"Specify name of main file output in depfile">,
+ MarshallingInfoStringVector<"DependencyOutputOpts.Targets">;
def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>,
HelpText<"Use NMake/Jom format for the depfile">,
MarshallingInfoFlag<"DependencyOutputOpts.OutputFormat", "DependencyOutputFormat::Make">,
@@ -753,7 +754,8 @@ def Wp_COMMA : CommaJoined<["-"], "Wp,">,
MetaVarName<"<arg>">, Group<Preprocessor_Group>;
def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
- HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">;
+ HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">,
+ MarshallingInfoStringVector<"DiagnosticOpts->UndefPrefixes">;
def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>,
@@ -1387,7 +1389,8 @@ def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
Flags<[CoreOption, NoXarchOption]>;
def fsanitize_blacklist : Joined<["-"], "fsanitize-blacklist=">,
Group<f_clang_Group>,
- HelpText<"Path to blacklist file for sanitizers">;
+ HelpText<"Path to blacklist file for sanitizers">,
+ MarshallingInfoStringVector<"LangOpts->SanitizerBlacklistFiles">;
def fsanitize_system_blacklist : Joined<["-"], "fsanitize-system-blacklist=">,
HelpText<"Path to system blacklist file for sanitizers">,
Flags<[CC1Option]>;
@@ -1405,13 +1408,15 @@ def fno_sanitize_coverage
"Sanitizers">, Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,inline-bool-flag">;
def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
- HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">;
+ HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
+ MarshallingInfoStringVector<"CodeGenOpts.SanitizeCoverageAllowlistFiles">;
def : Joined<["-"], "fsanitize-coverage-whitelist=">,
Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_allowlist>,
HelpText<"Deprecated, use -fsanitize-coverage-allowlist= instead">;
def fsanitize_coverage_blocklist : Joined<["-"], "fsanitize-coverage-blocklist=">,
Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
- HelpText<"Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones">;
+ HelpText<"Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones">,
+ MarshallingInfoStringVector<"CodeGenOpts.SanitizeCoverageBlocklistFiles">;
def : Joined<["-"], "fsanitize-coverage-blacklist=">,
Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_blocklist>,
HelpText<"Deprecated, use -fsanitize-coverage-blocklist= instead">;
@@ -1616,7 +1621,8 @@ defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks",
def frewrite_map_file : Separate<["-"], "frewrite-map-file">,
Group<f_Group>,
- Flags<[ NoXarchOption, CC1Option ]>;
+ Flags<[ NoXarchOption, CC1Option ]>,
+ MarshallingInfoStringVector<"CodeGenOpts.RewriteMapFiles">;
def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
Group<f_Group>,
Flags<[NoXarchOption]>;
@@ -1694,15 +1700,18 @@ def fxray_instruction_threshold_ :
def fxray_always_instrument :
JoinedOrSeparate<["-"], "fxray-always-instrument=">,
Group<f_Group>, Flags<[CC1Option]>,
- HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">;
+ HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">,
+ MarshallingInfoStringVector<"LangOpts->XRayAlwaysInstrumentFiles">;
def fxray_never_instrument :
JoinedOrSeparate<["-"], "fxray-never-instrument=">,
Group<f_Group>, Flags<[CC1Option]>,
- HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">;
+ HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">,
+ MarshallingInfoStringVector<"LangOpts->XRayNeverInstrumentFiles">;
def fxray_attr_list :
JoinedOrSeparate<["-"], "fxray-attr-list=">,
Group<f_Group>, Flags<[CC1Option]>,
- HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">;
+ HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">,
+ MarshallingInfoStringVector<"LangOpts->XRayAttrListFiles">;
def fxray_modes :
JoinedOrSeparate<["-"], "fxray-modes=">,
Group<f_Group>, Flags<[CC1Option]>,
@@ -2191,7 +2200,8 @@ def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption
HelpText<"Load the named plugin (dynamic shared object)">;
def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">,
- HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">;
+ HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">,
+ MarshallingInfoStringVector<"CodeGenOpts.PassPlugins">;
defm preserve_as_comments : BoolFOption<"preserve-as-comments",
"CodeGenOpts.PreserveAsmComments", DefaultsToTrue,
ChangedBy<NegFlag, [], "Do not preserve comments in inline assembly">,
@@ -2639,7 +2649,8 @@ def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">,
"absolute paths are relative to -isysroot">,
MetaVarName<"<directory>">, Flags<[CC1Option]>;
def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
- HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">;
+ HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">,
+ MarshallingInfoStringVector<"PreprocessorOpts->MacroIncludes">;
def image__base : Separate<["-"], "image_base">;
def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
@@ -2786,7 +2797,8 @@ def mkernel : Flag<["-"], "mkernel">, Group<m_Group>;
def mlinker_version_EQ : Joined<["-"], "mlinker-version=">,
Flags<[NoXarchOption]>;
def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option,CC1AsOption,CoreOption]>,
- HelpText<"Additional arguments to forward to LLVM's option processing">;
+ HelpText<"Additional arguments to forward to LLVM's option processing">,
+ MarshallingInfoStringVector<"FrontendOpts.LLVMArgs">;
def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
Group<m_Group>, HelpText<"Set Mac OS X deployment target">;
def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
@@ -3124,7 +3136,8 @@ def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>,
HelpText<"Don't generate implicit floating point instructions">;
def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>;
def mrecip : Flag<["-"], "mrecip">, Group<m_Group>;
-def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>;
+def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>,
+ MarshallingInfoStringVector<"CodeGenOpts.Reciprocals">;
def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>,
HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">,
MarshallingInfoString<"CodeGenOpts.PreferVectorWidth">;
@@ -4120,7 +4133,8 @@ def tune_cpu : Separate<["-"], "tune-cpu">,
HelpText<"Tune for a specific cpu type">,
MarshallingInfoString<"TargetOpts->TuneCPU">;
def target_feature : Separate<["-"], "target-feature">,
- HelpText<"Target specific attributes">;
+ HelpText<"Target specific attributes">,
+ MarshallingInfoStringVector<"TargetOpts->FeaturesAsWritten">;
def triple : Separate<["-"], "triple">,
HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
MarshallingInfoString<"TargetOpts->Triple", "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">,
@@ -4323,7 +4337,8 @@ def debug_info_macro : Flag<["-"], "debug-info-macro">,
HelpText<"Emit macro debug information">,
MarshallingInfoFlag<"CodeGenOpts.MacroDebugInfo">;
def default_function_attr : Separate<["-"], "default-function-attr">,
- HelpText<"Apply given attribute to all functions">;
+ HelpText<"Apply given attribute to all functions">,
+ MarshallingInfoStringVector<"CodeGenOpts.DefaultFunctionAttrs">;
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
MarshallingInfoStringInt<"CodeGenOpts.DwarfVersion">;
def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
@@ -4496,9 +4511,11 @@ def vectorize_slp : Flag<["-"], "vectorize-slp">,
HelpText<"Run the SLP vectorization passes">,
MarshallingInfoFlag<"CodeGenOpts.VectorizeSLP">;
def dependent_lib : Joined<["--"], "dependent-lib=">,
- HelpText<"Add dependent library">;
+ HelpText<"Add dependent library">,
+ MarshallingInfoStringVector<"CodeGenOpts.DependentLibraries">;
def linker_option : Joined<["--"], "linker-option=">,
- HelpText<"Add linker option">;
+ HelpText<"Add linker option">,
+ MarshallingInfoStringVector<"CodeGenOpts.LinkerOptions">;
def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
HelpText<"Sanitizer coverage type">,
MarshallingInfoStringInt<"CodeGenOpts.SanitizeCoverageType">;
@@ -4658,7 +4675,8 @@ def fcaret_diagnostics_max_lines :
def verify_EQ : CommaJoined<["-"], "verify=">,
MetaVarName<"<prefixes>">,
HelpText<"Verify diagnostic output using comment directives that start with"
- " prefixes in the comma-separated sequence <prefixes>">;
+ " prefixes in the comma-separated sequence <prefixes>">,
+ MarshallingInfoStringVector<"DiagnosticOpts->VerifyPrefixes">;
def verify : Flag<["-"], "verify">,
HelpText<"Equivalent to -verify=expected">;
def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
@@ -4679,7 +4697,8 @@ def cc1as : Flag<["-"], "cc1as">;
def ast_merge : Separate<["-"], "ast-merge">,
MetaVarName<"<ast file>">,
- HelpText<"Merge the given AST file into the translation unit being compiled.">;
+ HelpText<"Merge the given AST file into the translation unit being compiled.">,
+ MarshallingInfoStringVector<"FrontendOpts.ASTMergeFiles">;
def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
HelpText<"Target a specific auxiliary cpu type">;
def aux_target_feature : Separate<["-"], "aux-target-feature">,
@@ -4746,11 +4765,13 @@ def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
MarshallingInfoFlag<"HeaderSearchOpts->ModuleMapFileHomeIsCwd">;
def fmodule_feature : Separate<["-"], "fmodule-feature">,
MetaVarName<"<feature>">,
- HelpText<"Enable <feature> in module map requires declarations">;
+ HelpText<"Enable <feature> in module map requires declarations">,
+ MarshallingInfoStringVector<"LangOpts->ModuleFeatures">;
def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
MetaVarName<"<file>">,
HelpText<"Embed the contents of the specified file into the module file "
- "being compiled.">;
+ "being compiled.">,
+ MarshallingInfoStringVector<"FrontendOpts.ModulesEmbedFiles">;
def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
HelpText<"Embed the contents of all files read by this compilation into "
"the produced module file.">,
@@ -5190,7 +5211,8 @@ def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
//===----------------------------------------------------------------------===//
def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
- HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">;
+ HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">,
+ MarshallingInfoStringVector<"TargetOpts->OpenCLExtensionsAsWritten">;
//===----------------------------------------------------------------------===//
// CUDA Options
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index da4213e8952e2..49447f16637f6 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -328,7 +328,8 @@ static void denormalizeStringVector(SmallVectorImpl<const char *> &Args,
Option::OptionClass OptClass,
unsigned TableIndex,
const std::vector<std::string> &Values) {
- if (OptClass == Option::OptionClass::CommaJoinedClass) {
+ switch (OptClass) {
+ case Option::CommaJoinedClass: {
std::string CommaJoinedValue;
if (!Values.empty()) {
CommaJoinedValue.append(Values.front());
@@ -339,9 +340,17 @@ static void denormalizeStringVector(SmallVectorImpl<const char *> &Args,
}
denormalizeString(Args, Spelling, SA, Option::OptionClass::JoinedClass,
TableIndex, CommaJoinedValue);
- } else if (OptClass == Option::OptionClass::JoinedClass) {
+ break;
+ }
+ case Option::JoinedClass:
+ case Option::SeparateClass:
+ case Option::JoinedOrSeparateClass:
for (const std::string &Value : Values)
denormalizeString(Args, Spelling, SA, OptClass, TableIndex, Value);
+ break;
+ default:
+ llvm_unreachable("Cannot denormalize an option with option class "
+ "incompatible with string vector denormalization.");
}
}
@@ -996,8 +1005,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
}
- Opts.Reciprocals = Args.getAllArgValues(OPT_mrecip_EQ);
-
// Basic Block Sections implies Function Sections.
Opts.FunctionSections =
Args.hasArg(OPT_ffunction_sections) ||
@@ -1127,10 +1134,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
Opts.LinkBitcodeFiles.push_back(F);
}
- Opts.SanitizeCoverageAllowlistFiles =
- Args.getAllArgValues(OPT_fsanitize_coverage_allowlist);
- Opts.SanitizeCoverageBlocklistFiles =
- Args.getAllArgValues(OPT_fsanitize_coverage_blocklist);
Opts.SSPBufferSize =
getLastArgIntValue(Args, OPT_stack_protector_buffer_size, 8, Diags);
@@ -1212,8 +1215,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
}
- Opts.DependentLibraries = Args.getAllArgValues(OPT_dependent_lib);
- Opts.LinkerOptions = Args.getAllArgValues(OPT_linker_option);
bool NeedLocTracking = false;
if (!Opts.OptRecordFile.empty())
@@ -1287,8 +1288,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
if (NeedLocTracking && Opts.getDebugInfo() == codegenoptions::NoDebugInfo)
Opts.setDebugInfo(codegenoptions::LocTrackingOnly);
- Opts.RewriteMapFiles = Args.getAllArgValues(OPT_frewrite_map_file);
-
// Parse -fsanitize-recover= arguments.
// FIXME: Report unrecoverable sanitizers incorrectly specified here.
parseSanitizerKinds("-fsanitize-recover=",
@@ -1300,16 +1299,11 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true);
- Opts.DefaultFunctionAttrs = Args.getAllArgValues(OPT_default_function_attr);
-
- Opts.PassPlugins = Args.getAllArgValues(OPT_fpass_plugin_EQ);
-
return Success;
}
static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
ArgList &Args) {
- Opts.Targets = Args.getAllArgValues(OPT_MT);
if (Args.hasArg(OPT_show_includes)) {
// Writing both /showIncludes and preprocessor output to stdout
// would produce interleaved output, so use stderr for /showIncludes.
@@ -1487,7 +1481,6 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.ShowParseableFixits = Args.hasArg(OPT_fdiagnostics_parseable_fixits);
Opts.ShowPresumedLoc = !Args.hasArg(OPT_fno_diagnostics_use_presumed_location);
Opts.VerifyDiagnostics = Args.hasArg(OPT_verify) || Args.hasArg(OPT_verify_EQ);
- Opts.VerifyPrefixes = Args.getAllArgValues(OPT_verify_EQ);
if (Args.hasArg(OPT_verify))
Opts.VerifyPrefixes.push_back("expected");
// Keep VerifyPrefixes in its original order for the sake of diagnostics, and
@@ -1534,8 +1527,6 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.MessageLength =
getLastArgIntValue(Args, OPT_fmessage_length_EQ, 0, Diags);
- Opts.UndefPrefixes = Args.getAllArgValues(OPT_Wundef_prefix_EQ);
-
addDiagnosticArgs(Args, OPT_W_Group, OPT_W_value_Group, Opts.Warnings);
addDiagnosticArgs(Args, OPT_R_Group, OPT_R_value_Group, Opts.Remarks);
@@ -1732,8 +1723,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
}
Opts.Plugins = Args.getAllArgValues(OPT_load);
- Opts.ASTMergeFiles = Args.getAllArgValues(OPT_ast_merge);
- Opts.LLVMArgs = Args.getAllArgValues(OPT_mllvm);
Opts.ASTDumpDecls = Args.hasArg(OPT_ast_dump, OPT_ast_dump_EQ);
Opts.ASTDumpAll = Args.hasArg(OPT_ast_dump_all, OPT_ast_dump_all_EQ);
// Only the -fmodule-file=<file> form.
@@ -1742,7 +1731,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
if (Val.find('=') == StringRef::npos)
Opts.ModuleFiles.push_back(std::string(Val));
}
- Opts.ModulesEmbedFiles = Args.getAllArgValues(OPT_fmodules_embed_file_EQ);
Opts.AllowPCMWithCompilerErrors = Args.hasArg(OPT_fallow_pcm_with_errors);
if (Opts.ProgramAction != frontend::GenerateModule && Opts.IsSystemModule)
@@ -2542,7 +2530,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|| Args.hasArg(OPT_fdump_record_layouts);
if (Opts.FastRelaxedMath)
Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
- Opts.ModuleFeatures = Args.getAllArgValues(OPT_fmodule_feature);
llvm::sort(Opts.ModuleFeatures);
Opts.NativeHalfType |= Args.hasArg(OPT_fnative_half_type);
Opts.NativeHalfArgsAndReturns |= Args.hasArg(OPT_fnative_half_arguments_and_returns);
@@ -2750,20 +2737,12 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
// Parse -fsanitize= arguments.
parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
Diags, Opts.Sanitize);
- Opts.SanitizerBlacklistFiles = Args.getAllArgValues(OPT_fsanitize_blacklist);
std::vector<std::string> systemBlacklists =
Args.getAllArgValues(OPT_fsanitize_system_blacklist);
Opts.SanitizerBlacklistFiles.insert(Opts.SanitizerBlacklistFiles.end(),
systemBlacklists.begin(),
systemBlacklists.end());
- // -fxray-{always,never}-instrument= filenames.
- Opts.XRayAlwaysInstrumentFiles =
- Args.getAllArgValues(OPT_fxray_always_instrument);
- Opts.XRayNeverInstrumentFiles =
- Args.getAllArgValues(OPT_fxray_never_instrument);
- Opts.XRayAttrListFiles = Args.getAllArgValues(OPT_fxray_attr_list);
-
if (Arg *A = Args.getLastArg(OPT_fclang_abi_compat_EQ)) {
Opts.setClangABICompat(LangOptions::ClangABI::Latest);
@@ -2938,8 +2917,6 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
Opts.addMacroUndef(A->getValue());
}
- Opts.MacroIncludes = Args.getAllArgValues(OPT_imacros);
-
// Add the ordered list of -includes.
for (const auto *A : Args.filtered(OPT_include))
Opts.Includes.emplace_back(A->getValue());
@@ -2978,8 +2955,6 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
DiagnosticsEngine &Diags) {
- Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature);
- Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ);
Opts.AllowAMDGPUUnsafeFPAtomics =
Args.hasFlag(options::OPT_munsafe_fp_atomics,
options::OPT_mno_unsafe_fp_atomics, false);
More information about the llvm-branch-commits
mailing list