Home | History | Annotate | Download | only in Frontend

Lines Matching full:args

64 // Serialization (to args)
858 // Deserialization (to args)
866 static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
869 if (IK == IK_OpenCL && !Args.hasArg(OPT_cl_opt_disable))
872 return (Args.hasArg(OPT_Os) || Args.hasArg (OPT_Oz)) ? 2 :
873 Args.getLastArgIntValue(OPT_O, DefaultOpt, Diags);
876 static void ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
880 if (Arg *A = Args.getLastArg(OPT_analyzer_store)) {
881 llvm::StringRef Name = A->getValue(Args);
890 << A->getAsString(Args) << Name;
895 if (Arg *A = Args.getLastArg(OPT_analyzer_constraints)) {
896 llvm::StringRef Name = A->getValue(Args);
905 << A->getAsString(Args) << Name;
910 if (Arg *A = Args.getLastArg(OPT_analyzer_output)) {
911 llvm::StringRef Name = A->getValue(Args);
920 << A->getAsString(Args) << Name;
925 Opts.ShowCheckerHelp = Args.hasArg(OPT_analyzer_checker_help);
926 Opts.VisualizeEGDot = Args.hasArg(OPT_analyzer_viz_egraph_graphviz);
927 Opts.VisualizeEGUbi = Args.hasArg(OPT_analyzer_viz_egraph_ubigraph);
928 Opts.AnalyzeAll = Args.hasArg(OPT_analyzer_opt_analyze_headers);
929 Opts.AnalyzerDisplayProgress = Args.hasArg(OPT_analyzer_display_progress);
931 Args.hasArg(OPT_analyzer_opt_analyze_nested_blocks);
932 Opts.PurgeDead = !Args.hasArg(OPT_analyzer_no_purge_dead);
933 Opts.EagerlyAssume = Args.hasArg(OPT_analyzer_eagerly_assume);
934 Opts.AnalyzeSpecificFunction = Args.getLastArgValue(OPT_analyze_function);
935 Opts.UnoptimizedCFG = Args.hasArg(OPT_analysis_UnoptimizedCFG);
936 Opts.CFGAddImplicitDtors = Args.hasArg(OPT_analysis_CFGAddImplicitDtors);
937 Opts.CFGAddInitializers = Args.hasArg(OPT_analysis_CFGAddInitializers);
938 Opts.TrimGraph = Args.hasArg(OPT_trim_egraph);
939 Opts.MaxNodes = Args.getLastArgIntValue(OPT_analyzer_max_nodes, 150000,Diags);
940 Opts.MaxLoop = Args.getLastArgIntValue(OPT_analyzer_max_loop, 4, Diags);
941 Opts.EagerlyTrimEGraph = !Args.hasArg(OPT_analyzer_no_eagerly_trim_egraph);
942 Opts.InlineCall = Args.hasArg(OPT_analyzer_inline_call);
945 for (arg_iterator it = Args.filtered_begin(OPT_analyzer_checker,
947 ie = Args.filtered_end(); it != ie; ++it) {
953 llvm::StringRef checkerList = A->getValue(Args);
961 static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
965 Opts.OptimizationLevel = getOptimizationLevel(Args, IK, Diags);
968 << Args.getLastArg(OPT_O)->getAsString(Args) << Opts.OptimizationLevel;
976 Opts.DebugInfo = Args.hasArg(OPT_g);
977 Opts.LimitDebugInfo = Args.hasArg(OPT_flimit_debug_info);
978 Opts.DisableLLVMOpts = Args.hasArg(OPT_disable_llvm_optzns);
979 Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
980 Opts.ForbidGuardVariables = Args.hasArg(OPT_fforbid_guard_variables);
981 Opts.UseRegisterSizedBitfieldAccess = Args.hasArg(
983 Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
984 Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
985 Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants);
986 Opts.NoCommon = Args.hasArg(OPT_fno_common);
987 Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_float);
988 Opts.OptimizeSize = Args.hasArg(OPT_Os);
989 Opts.OptimizeSize = Args.hasArg(OPT_Oz) ? 2 : Opts.OptimizeSize;
990 Opts.SimplifyLibCalls = !(Args.hasArg(OPT_fno_builtin) ||
991 Args.hasArg(OPT_ffreestanding));
992 Opts.UnrollLoops = Args.hasArg(OPT_funroll_loops) ||
995 Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
996 Opts.ObjCAutoRefCountExceptions = Args.hasArg(OPT_fobjc_arc_exceptions);
997 Opts.ObjCRuntimeHasARC = Args.hasArg(OPT_fobjc_runtime_has_arc);
998 Opts.ObjCRuntimeHasTerminate = Args.hasArg(OPT_fobjc_runtime_has_terminate);
999 Opts.CXAAtExit = !Args.hasArg(OPT_fno_use_cxa_atexit);
1000 Opts.CXXCtorDtorAliases = Args.hasArg(OPT_mconstructor_aliases);
1001 Opts.CodeModel = Args.getLastArgValue(OPT_mcode_model);
1002 Opts.DebugPass = Args.getLastArgValue(OPT_mdebug_pass);
1003 Opts.DisableFPElim = Args.hasArg(OPT_mdisable_fp_elim);
1004 Opts.FloatABI = Args.getLastArgValue(OPT_mfloat_abi);
1005 Opts.HiddenWeakVTables = Args.hasArg(OPT_fhidden_weak_vtables);
1006 Opts.LessPreciseFPMAD = Args.hasArg(OPT_cl_mad_enable);
1007 Opts.LimitFloatPrecision = Args.getLastArgValue(OPT_mlimit_float_precision);
1008 Opts.NoInfsFPMath = Opts.NoNaNsFPMath = Args.hasArg(OPT_cl_finite_math_only)||
1009 Args.hasArg(OPT_cl_fast_relaxed_math);
1010 Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
1011 Opts.BackendOptions = Args.getAllArgValues(OPT_backend_option);
1012 Opts.NumRegisterParameters = Args.getLastArgIntValue(OPT_mregparm, 0, Diags);
1013 Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
1014 Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
1015 Opts.OmitLeafFramePointer = Args.hasArg(OPT_momit_leaf_frame_pointer);
1016 Opts.SaveTempLabels = Args.hasArg(OPT_msave_temp_labels);
1017 Opts.NoDwarf2CFIAsm = Args.hasArg(OPT_fno_dwarf2_cfi_asm);
1018 Opts.SoftFloat = Args.hasArg(OPT_msoft_float);
1019 Opts.UnsafeFPMath = Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
1020 Args.hasArg(OPT_cl_fast_relaxed_math);
1021 Opts.UnwindTables = Args.hasArg(OPT_munwind_tables);
1022 Opts.RelocationModel = Args.getLastArgValue(OPT_mrelocation_model, "pic");
1024 Opts.FunctionSections = Args.hasArg(OPT_ffunction_sections);
1025 Opts.DataSections = Args.hasArg(OPT_fdata_sections);
1027 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name);
1028 Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
1030 Opts.InstrumentFunctions = Args.hasArg(OPT_finstrument_functions);
1031 Opts.InstrumentForProfiling = Args.hasArg(OPT_pg);
1032 Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data);
1033 Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes);
1034 Opts.CoverageFile = Args.getLastArgValue(OPT_coverage_file);
1036 if (Arg *A = Args.getLastArg(OPT_fobjc_dispatch_method_EQ)) {
1037 llvm::StringRef Name = A->getValue(Args);
1044 Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name;
1051 ArgList &Args) {
1053 Opts.OutputFile = Args.getLastArgValue(OPT_dependency_file);
1054 Opts.Targets = Args.getAllArgValues(OPT_MT);
1055 Opts.IncludeSystemHeaders = Args.hasArg(OPT_sys_header_deps);
1056 Opts.UsePhonyTargets = Args.hasArg(OPT_MP);
1057 Opts.ShowHeaderIncludes = Args.hasArg(OPT_H);
1058 Opts.HeaderIncludeOutputFile = Args.getLastArgValue(OPT_header_include_file);
1059 Opts.AddMissingHeaderDeps = Args.hasArg(OPT_MG);
1062 static void ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
1065 Opts.DiagnosticLogFile = Args.getLastArgValue(OPT_diagnostic_log_file);
1066 Opts.IgnoreWarnings = Args.hasArg(OPT_w);
1067 Opts.NoRewriteMacros = Args.hasArg(OPT_Wno_rewrite_macros);
1068 Opts.Pedantic = Args.hasArg(OPT_pedantic);
1069 Opts.PedanticErrors = Args.hasArg(OPT_pedantic_errors);
1070 Opts.ShowCarets = !Args.hasArg(OPT_fno_caret_diagnostics);
1071 Opts.ShowColors = Args.hasArg(OPT_fcolor_diagnostics);
1072 Opts.ShowColumn = Args.hasFlag(OPT_fshow_column,
1075 Opts.ShowFixits = !Args.hasArg(OPT_fno_diagnostics_fixit_info);
1076 Opts.ShowLocation = !Args.hasArg(OPT_fno_show_source_location);
1077 Opts.ShowNames = Args.hasArg(OPT_fdiagnostics_show_name);
1078 Opts.ShowOptionNames = Args.hasArg(OPT_fdiagnostics_show_option);
1082 if (Arg *A = Args.getLastArg(OPT_fdiagnostics_show_note_include_stack,
1088 Args.getLastArgValue(OPT_fshow_overloads_EQ, "all");
1095 << Args.getLastArg(OPT_fshow_overloads_EQ)->getAsString(Args)
1099 Args.getLastArgValue(OPT_fdiagnostics_show_category, "none");
1108 << Args.getLastArg(OPT_fdiagnostics_show_category)->getAsString(Args)
1112 Args.getLastArgValue(OPT_fdiagnostics_format, "clang");
1121 << Args.getLastArg(OPT_fdiagnostics_format)->getAsString(Args)
1124 Opts.ShowSourceRanges = Args.hasArg(OPT_fdiagnostics_print_source_range_info);
1125 Opts.ShowParseableFixits = Args.hasArg(OPT_fdiagnostics_parseable_fixits);
1126 Opts.VerifyDiagnostics = Args.hasArg(OPT_verify);
1127 Opts.ErrorLimit = Args.getLastArgIntValue(OPT_ferror_limit, 0, Diags);
1129 = Args.getLastArgIntValue(OPT_fmacro_backtrace_limit,
1132 = Args.getLastArgIntValue(OPT_ftemplate_backtrace_limit,
1135 Opts.TabStop = Args.getLastArgIntValue(OPT_ftabstop,
1142 Opts.MessageLength = Args.getLastArgIntValue(OPT_fmessage_length, 0, Diags);
1143 Opts.DumpBuildInformation = Args.getLastArgValue(OPT_dump_build_information);
1144 Opts.Warnings = Args.getAllArgValues(OPT_W);
1147 static void ParseFileSystemArgs(FileSystemOptions &Opts, ArgList &Args) {
1148 Opts.WorkingDir = Args.getLastArgValue(OPT_working_directory);
1151 static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
1155 if (const Arg *A = Args.getLastArg(OPT_Action_Group)) {
1186 Opts.FixItSuffix = A->getValue(Args);
1219 if (const Arg* A = Args.getLastArg(OPT_plugin)) {
1220 Opts.Plugins.push_back(A->getValue(Args,0));
1222 Opts.ActionName = A->getValue(Args);
1224 for (arg_iterator it = Args.filtered_begin(OPT_plugin_arg),
1225 end = Args.filtered_end(); it != end; ++it) {
1226 if ((*it)->getValue(Args, 0) == Opts.ActionName)
1227 Opts.PluginArgs.push_back((*it)->getValue(Args, 1));
1231 Opts.AddPluginActions = Args.getAllArgValues(OPT_add_plugin);
1234 for (arg_iterator it = Args.filtered_begin(OPT_plugin_arg),
1235 end = Args.filtered_end(); it != end; ++it) {
1236 if ((*it)->getValue(Args, 0) == Opts.AddPluginActions[i])
1237 Opts.AddPluginArgs[i].push_back((*it)->getValue(Args, 1));
1241 if (const Arg *A = Args.getLastArg(OPT_code_completion_at)) {
1243 ParsedSourceLocation::FromString(A->getValue(Args));
1246 << A->getAsString(Args) << A->getValue(Args);
1248 Opts.DisableFree = Args.hasArg(OPT_disable_free);
1250 Opts.OutputFile = Args.getLastArgValue(OPT_o);
1251 Opts.Plugins = Args.getAllArgValues(OPT_load);
1252 Opts.RelocatablePCH = Args.hasArg(OPT_relocatable_pch);
1253 Opts.ChainedPCH = Args.hasArg(OPT_chained_pch);
1254 Opts.ShowHelp = Args.hasArg(OPT_help);
1255 Opts.ShowMacrosInCodeCompletion = Args.hasArg(OPT_code_completion_macros);
1257 = Args.hasArg(OPT_code_completion_patterns);
1259 = !Args.hasArg(OPT_no_code_completion_globals);
1260 Opts.ShowStats = Args.hasArg(OPT_print_stats);
1261 Opts.ShowTimers = Args.hasArg(OPT_ftime_report);
1262 Opts.ShowVersion = Args.hasArg(OPT_version);
1263 Opts.ASTMergeFiles = Args.getAllArgValues(OPT_ast_merge);
1264 Opts.LLVMArgs = Args.getAllArgValues(OPT_mllvm);
1265 Opts.FixWhatYouCan = Args.hasArg(OPT_fix_what_you_can);
1266 Opts.Modules = Args.getAllArgValues(OPT_import_module);
1269 if (const Arg *A = Args.getLastArg(OPT_arcmt_check,
1286 Opts.ARCMTMigrateDir = Args.getLastArgValue(OPT_arcmt_migrate_directory);
1288 = Args.getLastArgValue(OPT_arcmt_migrate_report_output);
1290 = Args.hasArg(OPT_arcmt_migrate_emit_arc_errors);
1293 if (const Arg *A = Args.getLastArg(OPT_x)) {
1294 DashX = llvm::StringSwitch<InputKind>(A->getValue(Args))
1316 << A->getAsString(Args) << A->getValue(Args);
1320 std::vector<std::string> Inputs = Args.getAllArgValues(OPT_INPUT);
1356 static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
1358 Opts.Sysroot = Args.getLastArgValue(OPT_isysroot, "/");
1359 Opts.Verbose = Args.hasArg(OPT_v);
1360 Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc);
1361 Opts.UseStandardIncludes = !Args.hasArg(OPT_nostdinc);
1362 Opts.UseStandardCXXIncludes = !Args.hasArg(OPT_nostdincxx);
1363 if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ))
1364 Opts.UseLibcxx = (strcmp(A->getValue(Args), "libc++") == 0);
1365 Opts.ResourceDir = Args.getLastArgValue(OPT_resource_dir);
1368 for (arg_iterator it = Args.filtered_begin(OPT_I, OPT_F),
1369 ie = Args.filtered_end(); it != ie; ++it)
1370 Opts.AddPath((*it)->getValue(Args), frontend::Angled, true,
1375 for (arg_iterator it = Args.filtered_begin(OPT_iprefix, OPT_iwithprefix,
1377 ie = Args.filtered_end(); it != ie; ++it) {
1380 Prefix = A->getValue(Args);
1382 Opts.AddPath(Prefix.str() + A->getValue(Args),
1385 Opts.AddPath(Prefix.str() + A->getValue(Args),
1389 for (arg_iterator it = Args.filtered_begin(OPT_idirafter),
1390 ie = Args.filtered_end(); it != ie; ++it)
1391 Opts.AddPath((*it)->getValue(Args), frontend::After, true, false, false);
1392 for (arg_iterator it = Args.filtered_begin(OPT_iquote),
1393 ie = Args.filtered_end(); it != ie; ++it)
1394 Opts.AddPath((*it)->getValue(Args), frontend::Quoted, true, false, false);
1395 for (arg_iterator it = Args.filtered_begin(OPT_cxx_isystem, OPT_isystem,
1396 OPT_iwithsysroot), ie = Args.filtered_end(); it != ie; ++it)
1397 Opts.AddPath((*it)->getValue(Args),
1485 static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
1489 if (const Arg *A = Args.getLastArg(OPT_std_EQ)) {
1490 LangStd = llvm::StringSwitch<LangStandard::Kind>(A->getValue(Args))
1497 << A->getAsString(Args) << A->getValue(Args);
1508 << A->getAsString(Args) << "C/ObjC";
1516 << A->getAsString(Args) << "C++/ObjC++";
1521 << A->getAsString(Args) << "OpenCL";
1526 << A->getAsString(Args) << "CUDA";
1534 if (const Arg *A = Args.getLastArg(OPT_cl_std_EQ)) {
1535 if (strcmp(A->getValue(Args), "CL1.1") != 0) {
1537 << A->getAsString(Args) << A->getValue(Args);
1548 Opts.GNUKeywords = Args.hasFlag(OPT_fgnu_keywords, OPT_fno_gnu_keywords,
1551 if (Args.hasArg(OPT_fno_operator_names))
1555 if (Args.hasArg(OPT_fobjc_gc_only))
1557 else if (Args.hasArg(OPT_fobjc_gc))
1559 else if (Args.hasArg(OPT_fobjc_arc)) {
1561 if (!Args.hasArg(OPT_fobjc_nonfragile_abi))
1565 if (Args.hasArg(OPT_fobjc_runtime_has_weak))
1568 if (Args.hasArg(OPT_fno_objc_infer_related_result_type))
1572 if (Args.hasArg(OPT_fgnu89_inline))
1575 if (Args.hasArg(OPT_fapple_kext)) {
1582 if (Args.hasArg(OPT_print_ivar_layout))
1584 if (Args.hasArg(OPT_fno_constant_cfstrings))
1587 if (Args.hasArg(OPT_faltivec))
1590 if (Args.hasArg(OPT_pthread))
1593 if (Args.hasArg(OPT_fdelayed_template_parsing))
1596 llvm::StringRef Vis = Args.getLastArgValue(OPT_fvisibility, "default");
1605 << Args.getLastArg(OPT_fvisibility)->getAsString(Args) << Vis;
1607 if (Args.hasArg(OPT_fvisibility_inlines_hidden))
1610 if (Args.hasArg(OPT_ftrapv)) {
1614 Args.getLastArgValue(OPT_ftrapv_handler);
1616 else if (Args.hasArg(OPT_fwrapv))
1619 if (Args.hasArg(OPT_trigraphs))
1622 Opts.DollarIdents = Args.hasFlag(OPT_fdollars_in_identifiers,
1625 Opts.PascalStrings = Args.hasArg(OPT_fpascal_strings);
1626 Opts.Microsoft = Args.hasArg(OPT_fms_extensions);
1627 Opts.MSCVersion = Args.getLastArgIntValue(OPT_fmsc_version, 0, Diags);
1628 Opts.Borland = Args.hasArg(OPT_fborland_extensions);
1629 Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings);
1630 Opts.ConstStrings = Args.hasFlag(OPT_fconst_strings, OPT_fno_const_strings,
1632 if (Args.hasArg(OPT_fno_lax_vector_conversions))
1634 if (Args.hasArg(OPT_fno_threadsafe_statics))
1636 Opts.Exceptions = Args.hasArg(OPT_fexceptions);
1637 Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions);
1638 Opts.CXXExceptions = Args.hasArg(OPT_fcxx_exceptions);
1639 Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions);
1640 Opts.TraditionalCPP = Args.hasArg(OPT_traditional_cpp);
1642 Opts.RTTI = !Args.hasArg(OPT_fno_rtti);
1643 Opts.Blocks = Args.hasArg(OPT_fblocks);
1644 Opts.CharIsSigned = !Args.hasArg(OPT_fno_signed_char);
1645 Opts.ShortWChar = Args.hasArg(OPT_fshort_wchar);
1646 Opts.ShortEnums = Args.hasArg(OPT_fshort_enums);
1647 Opts.Freestanding = Args.hasArg(OPT_ffreestanding);
1648 Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding;
1649 Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
1650 Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
1651 Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
1652 Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
1653 Opts.MathErrno = Args.hasArg(OPT_fmath_errno);
1654 Opts.InstantiationDepth = Args.getLastArgIntValue(OPT_ftemplate_depth, 1024,
1656 Opts.DelayedTemplateParsing = Args.hasArg(OPT_fdelayed_template_parsing);
1657 Opts.NumLargeByValueCopy = Args.getLastArgIntValue(OPT_Wlarge_by_value_copy,
1659 Opts.MSBitfields = Args.hasArg(OPT_mms_bitfields);
1660 Opts.NeXTRuntime = !Args.hasArg(OPT_fgnu_runtime);
1662 Args.getLastArgValue(OPT_fconstant_string_class);
1663 Opts.ObjCNonFragileABI = Args.hasArg(OPT_fobjc_nonfragile_abi);
1667 Args.hasArg(OPT_fobjc_default_synthesize_properties);
1668 Opts.CatchUndefined = Args.hasArg(OPT_fcatch_undefined_behavior);
1669 Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls);
1670 Opts.PICLevel = Args.getLastArgIntValue(OPT_pic_level, 0, Diags);
1671 Opts.Static = Args.hasArg(OPT_static_define);
1672 Opts.DumpRecordLayouts = Args.hasArg(OPT_fdump_record_layouts);
1673 Opts.DumpVTableLayouts = Args.hasArg(OPT_fdump_vtable_layouts);
1674 Opts.SpellChecking = !Args.hasArg(OPT_fno_spell_checking);
1675 Opts.NoBitFieldTypeAlign = Args.hasArg(OPT_fno_bitfield_type_align);
1676 Opts.SinglePrecisionConstants = Args.hasArg(OPT_cl_single_precision_constant);
1677 Opts.FastRelaxedMath = Args.hasArg(OPT_cl_fast_relaxed_math);
1679 Opts.MRTD = Args.hasArg(OPT_mrtd);
1680 Opts.FakeAddressSpaceMap = Args.hasArg(OPT_ffake_address_space_map);
1681 Opts.ParseUnknownAnytype = Args.hasArg(OPT_funknown_anytype);
1682 Opts.DebuggerSupport = Args.hasArg(OPT_fdebugger_support);
1685 Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,
1690 unsigned Opt = getOptimizationLevel(Args, IK, Diags);
1700 unsigned SSP = Args.getLastArgIntValue(OPT_stack_protector, 0, Diags);
1704 << Args.getLastArg(OPT_stack_protector)->getAsString(Args) << SSP;
1712 static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
1716 Opts.ImplicitPCHInclude = Args.getLastArgValue(OPT_include_pch);
1717 Opts.ImplicitPTHInclude = Args.getLastArgValue(OPT_include_pth);
1718 if (const Arg *A = Args.getLastArg(OPT_token_cache))
1719 Opts.TokenCache = A->getValue(Args);
1722 Opts.UsePredefines = !Args.hasArg(OPT_undef);
1723 Opts.DetailedRecord = Args.hasArg(OPT_detailed_preprocessing_record);
1724 Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch);
1726 Opts.DumpDeserializedPCHDecls = Args.hasArg(OPT_dump_deserialized_pch_decls);
1727 for (arg_iterator it = Args.filtered_begin(OPT_error_on_deserialized_pch_decl),
1728 ie = Args.filtered_end(); it != ie; ++it) {
1730 Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue(Args));
1733 if (const Arg *A = Args.getLastArg(OPT_preamble_bytes_EQ)) {
1734 llvm::StringRef Value(A->getValue(Args));
1750 for (arg_iterator it = Args.filtered_begin(OPT_D, OPT_U),
1751 ie = Args.filtered_end(); it != ie; ++it) {
1753 Opts.addMacroDef((*it)->getValue(Args));
1755 Opts.addMacroUndef((*it)->getValue(Args));
1758 Opts.MacroIncludes = Args.getAllArgValues(OPT_imacros);
1761 for (arg_iterator it = Args.filtered_begin(OPT_include, OPT_include_pch,
1763 ie = Args.filtered_end(); it != ie; ++it) {
1768 ASTReader::getOriginalSourceFile(A->getValue(Args), FileMgr, Diags);
1774 Opts.Includes.push_back(A->getValue(Args));
1777 for (arg_iterator it = Args.filtered_begin(OPT_chain_include),
1778 ie = Args.filtered_end(); it != ie; ++it) {
1780 Opts.ChainedIncludes.push_back(A->getValue(Args));
1784 if (Args.hasArg(OPT_faltivec))
1787 for (arg_iterator it = Args.filtered_begin(OPT_remap_file),
1788 ie = Args.filtered_end(); it != ie; ++it) {
1791 llvm::StringRef(A->getValue(Args)).split(';');
1794 Diags.Report(diag::err_drv_invalid_remap_file) << A->getAsString(Args);
1801 if (Arg *A = Args.getLastArg(OPT_fobjc_arc_cxxlib_EQ)) {
1802 llvm::StringRef Name = A->getValue(Args);
1809 Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name;
1816 ArgList &Args) {
1818 Opts.ShowCPP = !Args.hasArg(OPT_dM);
1819 Opts.ShowComments = Args.hasArg(OPT_C);
1820 Opts.ShowLineMarkers = !Args.hasArg(OPT_P);
1821 Opts.ShowMacroComments = Args.hasArg(OPT_CC);
1822 Opts.ShowMacros = Args.hasArg(OPT_dM) || Args.hasArg(OPT_dD);
1825 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
1827 Opts.ABI = Args.getLastArgValue(OPT_target_abi);
1828 Opts.CXXABI = Args.getLastArgValue(OPT_cxx_abi);
1829 Opts.CPU = Args.getLastArgValue(OPT_target_cpu);
1830 Opts.Features = Args.getAllArgValues(OPT_target_feature);
1831 Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version);
1832 Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple));
1848 llvm::OwningPtr<InputArgList> Args(
1854 << Args->getArgString(MissingArgIndex) << MissingArgCount;
1857 for (arg_iterator it = Args->filtered_begin(OPT_UNKNOWN),
1858 ie = Args->filtered_end(); it != ie; ++it)
1859 Diags.Report(diag::err_drv_unknown_argument) << (*it)->getAsString(*Args);
1861 ParseAnalyzerArgs(Res.getAnalyzerOpts(), *Args, Diags);
1862 ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args);
1863 ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, Diags);
1864 ParseFileSystemArgs(Res.getFileSystemOpts(), *Args);
1866 InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags);
1867 ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags);
1868 ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args);
1870 ParseLangArgs(Res.getLangOpts(), *Args, DashX, Diags);
1879 ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args, FileMgr, Diags);
1880 ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args);
1881 ParseTargetArgs(Res.getTargetOpts(), *Args);