Lines Matching refs:options
88 if (Arg *A = Args.getLastArg(options::OPT_C, options::OPT_CC)) { in CheckPreprocessingOptions()
89 if (!Args.hasArg(options::OPT_E) && !Args.hasArg(options::OPT__SLASH_P) && in CheckPreprocessingOptions()
90 !Args.hasArg(options::OPT__SLASH_EP) && !D.CCCIsCPP()) { in CheckPreprocessingOptions()
102 if (Args.hasArg(options::OPT_static)) in CheckCodeGenerationOptions()
104 Args.getLastArg(options::OPT_dynamic, options::OPT_mdynamic_no_pic)) in CheckCodeGenerationOptions()
215 Args.AddAllArgValues(CmdArgs, options::OPT_Zlinker_input); in AddLinkerInputs()
232 if (A.getOption().matches(options::OPT_Z_reserved_lib_stdcxx)) in AddLinkerInputs()
234 else if (A.getOption().matches(options::OPT_Z_reserved_lib_cckext)) in AddLinkerInputs()
236 else if (A.getOption().matches(options::OPT_z)) { in AddLinkerInputs()
254 return Args.hasFlag(options::OPT_fobjc_arc, options::OPT_fno_objc_arc, false); in isObjCAutoRefCount()
260 Args.ClaimAllArgs(options::OPT_fobjc_link_runtime); in isObjCRuntimeLinked()
263 return Args.hasArg(options::OPT_fobjc_link_runtime); in isObjCRuntimeLinked()
270 !O.hasFlag(options::DriverOption) && !O.hasFlag(options::LinkerInput); in forwardToGCC()
283 Args.AddLastArg(CmdArgs, options::OPT_C); in AddPreprocessingOptions()
284 Args.AddLastArg(CmdArgs, options::OPT_CC); in AddPreprocessingOptions()
287 if ((A = Args.getLastArg(options::OPT_M, options::OPT_MM)) || in AddPreprocessingOptions()
288 (A = Args.getLastArg(options::OPT_MD)) || in AddPreprocessingOptions()
289 (A = Args.getLastArg(options::OPT_MMD))) { in AddPreprocessingOptions()
292 if (Arg *MF = Args.getLastArg(options::OPT_MF)) { in AddPreprocessingOptions()
297 } else if (A->getOption().matches(options::OPT_M) || in AddPreprocessingOptions()
298 A->getOption().matches(options::OPT_MM)) { in AddPreprocessingOptions()
308 if (!Args.hasArg(options::OPT_MT) && !Args.hasArg(options::OPT_MQ)) { in AddPreprocessingOptions()
313 Arg *OutputOpt = Args.getLastArg(options::OPT_o); in AddPreprocessingOptions()
331 if (A->getOption().matches(options::OPT_M) || in AddPreprocessingOptions()
332 A->getOption().matches(options::OPT_MD)) in AddPreprocessingOptions()
335 !Args.hasArg(options::OPT_fno_module_file_deps)) || in AddPreprocessingOptions()
336 Args.hasArg(options::OPT_fmodule_file_deps)) in AddPreprocessingOptions()
340 if (Args.hasArg(options::OPT_MG)) { in AddPreprocessingOptions()
341 if (!A || A->getOption().matches(options::OPT_MD) || in AddPreprocessingOptions()
342 A->getOption().matches(options::OPT_MMD)) in AddPreprocessingOptions()
347 Args.AddLastArg(CmdArgs, options::OPT_MP); in AddPreprocessingOptions()
348 Args.AddLastArg(CmdArgs, options::OPT_MV); in AddPreprocessingOptions()
351 for (const Arg *A : Args.filtered(options::OPT_MT, options::OPT_MQ)) { in AddPreprocessingOptions()
354 if (A->getOption().matches(options::OPT_MQ)) { in AddPreprocessingOptions()
372 for (const Arg *A : Args.filtered(options::OPT_clang_i_Group)) { in AddPreprocessingOptions()
373 if (A->getOption().matches(options::OPT_include)) { in AddPreprocessingOptions()
429 {options::OPT_D, options::OPT_U, options::OPT_I_Group, in AddPreprocessingOptions()
430 options::OPT_F, options::OPT_index_header_map}); in AddPreprocessingOptions()
438 Args.AddAllArgValues(CmdArgs, options::OPT_Wp_COMMA, in AddPreprocessingOptions()
439 options::OPT_Xpreprocessor); in AddPreprocessingOptions()
442 if (Arg *A = Args.getLastArg(options::OPT_I_)) in AddPreprocessingOptions()
449 if (!Args.hasArg(options::OPT_isysroot)) { in AddPreprocessingOptions()
552 if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) in getARMArchCPUFromArgs()
554 if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) in getARMArchCPUFromArgs()
560 Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { in getARMArchCPUFromArgs()
647 Args.getLastArg(options::OPT_msoft_float, options::OPT_mhard_float, in getARMFloatABI()
648 options::OPT_mfloat_abi_EQ)) { in getARMFloatABI()
649 if (A->getOption().matches(options::OPT_msoft_float)) { in getARMFloatABI()
651 } else if (A->getOption().matches(options::OPT_mhard_float)) { in getARMFloatABI()
743 Args.hasArg(options::OPT_mkernel, options::OPT_fapple_kext); in getARMTargetFeatures()
772 Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { in getARMTargetFeatures()
787 const Arg *ArchArg = Args.getLastArg(options::OPT_march_EQ); in getARMTargetFeatures()
803 const Arg *CPUArg = Args.getLastArg(options::OPT_mcpu_EQ); in getARMTargetFeatures()
826 const Arg *FPUArg = Args.getLastArg(options::OPT_mfpu_EQ); in getARMTargetFeatures()
838 const Arg *HDivArg = Args.getLastArg(options::OPT_mhwdiv_EQ); in getARMTargetFeatures()
857 if (Arg *A = Args.getLastArg(options::OPT_mcrc, options::OPT_mnocrc)) { in getARMTargetFeatures()
858 if (A->getOption().matches(options::OPT_mcrc)) in getARMTargetFeatures()
871 if (Arg *A = Args.getLastArg(options::OPT_mlong_calls, in getARMTargetFeatures()
872 options::OPT_mno_long_calls)) { in getARMTargetFeatures()
873 if (A->getOption().matches(options::OPT_mlong_calls)) in getARMTargetFeatures()
883 else if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, in getARMTargetFeatures()
884 options::OPT_munaligned_access)) { in getARMTargetFeatures()
885 if (A->getOption().matches(options::OPT_munaligned_access)) { in getARMTargetFeatures()
920 if (Args.hasArg(options::OPT_ffixed_r9)) in getARMTargetFeatures()
934 if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) { in AddARMTargetArgs()
990 if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge, in AddARMTargetArgs()
991 options::OPT_mno_global_merge)) { in AddARMTargetArgs()
993 if (A->getOption().matches(options::OPT_mno_global_merge)) in AddARMTargetArgs()
999 if (!Args.hasFlag(options::OPT_mimplicit_float, in AddARMTargetArgs()
1000 options::OPT_mno_implicit_float, true)) in AddARMTargetArgs()
1011 if ((A = Args.getLastArg(options::OPT_mtune_EQ))) { in getAArch64TargetCPU()
1013 } else if ((A = Args.getLastArg(options::OPT_mcpu_EQ))) { in getAArch64TargetCPU()
1026 if (Args.getLastArg(options::OPT_arch)) in getAArch64TargetCPU()
1037 if (!Args.hasFlag(options::OPT_mred_zone, options::OPT_mno_red_zone, true) || in AddAArch64TargetArgs()
1038 Args.hasArg(options::OPT_mkernel) || in AddAArch64TargetArgs()
1039 Args.hasArg(options::OPT_fapple_kext)) in AddAArch64TargetArgs()
1042 if (!Args.hasFlag(options::OPT_mimplicit_float, in AddAArch64TargetArgs()
1043 options::OPT_mno_implicit_float, true)) in AddAArch64TargetArgs()
1047 if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) in AddAArch64TargetArgs()
1057 if (Arg *A = Args.getLastArg(options::OPT_mfix_cortex_a53_835769, in AddAArch64TargetArgs()
1058 options::OPT_mno_fix_cortex_a53_835769)) { in AddAArch64TargetArgs()
1060 if (A->getOption().matches(options::OPT_mfix_cortex_a53_835769)) in AddAArch64TargetArgs()
1071 if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge, in AddAArch64TargetArgs()
1072 options::OPT_mno_global_merge)) { in AddAArch64TargetArgs()
1074 if (A->getOption().matches(options::OPT_mno_global_merge)) in AddAArch64TargetArgs()
1104 if (Arg *A = Args.getLastArg(options::OPT_march_EQ, options::OPT_mcpu_EQ)) in getMipsCPUAndABI()
1107 if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) { in getMipsCPUAndABI()
1176 Args.getLastArg(options::OPT_msoft_float, options::OPT_mhard_float, in getMipsFloatABI()
1177 options::OPT_mfloat_abi_EQ)) { in getMipsFloatABI()
1178 if (A->getOption().matches(options::OPT_msoft_float)) in getMipsFloatABI()
1180 else if (A->getOption().matches(options::OPT_mhard_float)) in getMipsFloatABI()
1226 AddTargetFeature(Args, Features, options::OPT_mno_abicalls, in getMIPSTargetFeatures()
1227 options::OPT_mabicalls, "noabicalls"); in getMIPSTargetFeatures()
1237 if (Arg *A = Args.getLastArg(options::OPT_mnan_EQ)) { in getMIPSTargetFeatures()
1258 AddTargetFeature(Args, Features, options::OPT_msingle_float, in getMIPSTargetFeatures()
1259 options::OPT_mdouble_float, "single-float"); in getMIPSTargetFeatures()
1260 AddTargetFeature(Args, Features, options::OPT_mips16, options::OPT_mno_mips16, in getMIPSTargetFeatures()
1262 AddTargetFeature(Args, Features, options::OPT_mmicromips, in getMIPSTargetFeatures()
1263 options::OPT_mno_micromips, "micromips"); in getMIPSTargetFeatures()
1264 AddTargetFeature(Args, Features, options::OPT_mdsp, options::OPT_mno_dsp, in getMIPSTargetFeatures()
1266 AddTargetFeature(Args, Features, options::OPT_mdspr2, options::OPT_mno_dspr2, in getMIPSTargetFeatures()
1268 AddTargetFeature(Args, Features, options::OPT_mmsa, options::OPT_mno_msa, in getMIPSTargetFeatures()
1273 if (Arg *A = Args.getLastArg(options::OPT_mfp32, options::OPT_mfpxx, in getMIPSTargetFeatures()
1274 options::OPT_mfp64)) { in getMIPSTargetFeatures()
1275 if (A->getOption().matches(options::OPT_mfp32)) in getMIPSTargetFeatures()
1277 else if (A->getOption().matches(options::OPT_mfpxx)) { in getMIPSTargetFeatures()
1287 AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg, in getMIPSTargetFeatures()
1288 options::OPT_modd_spreg, "nooddspreg"); in getMIPSTargetFeatures()
1315 if (Arg *A = Args.getLastArg(options::OPT_mxgot, options::OPT_mno_xgot)) { in AddMIPSTargetArgs()
1316 if (A->getOption().matches(options::OPT_mxgot)) { in AddMIPSTargetArgs()
1322 if (Arg *A = Args.getLastArg(options::OPT_mldc1_sdc1, in AddMIPSTargetArgs()
1323 options::OPT_mno_ldc1_sdc1)) { in AddMIPSTargetArgs()
1324 if (A->getOption().matches(options::OPT_mno_ldc1_sdc1)) { in AddMIPSTargetArgs()
1330 if (Arg *A = Args.getLastArg(options::OPT_mcheck_zero_division, in AddMIPSTargetArgs()
1331 options::OPT_mno_check_zero_division)) { in AddMIPSTargetArgs()
1332 if (A->getOption().matches(options::OPT_mno_check_zero_division)) { in AddMIPSTargetArgs()
1338 if (Arg *A = Args.getLastArg(options::OPT_G)) { in AddMIPSTargetArgs()
1348 if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { in getPPCTargetCPU()
1413 for (const Arg *A : Args.filtered(options::OPT_m_ppc_Features_Group)) { in getPPCTargetFeatures()
1439 AddTargetFeature(Args, Features, options::OPT_faltivec, in getPPCTargetFeatures()
1440 options::OPT_fno_altivec, "altivec"); in getPPCTargetFeatures()
1446 Args.getLastArg(options::OPT_msoft_float, options::OPT_mhard_float, in getPPCFloatABI()
1447 options::OPT_mfloat_abi_EQ)) { in getPPCFloatABI()
1448 if (A->getOption().matches(options::OPT_msoft_float)) in getPPCFloatABI()
1450 else if (A->getOption().matches(options::OPT_mhard_float)) in getPPCFloatABI()
1483 if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) in AddPPCTargetArgs()
1485 HasQPX = Args.hasFlag(options::OPT_mqpx, options::OPT_mno_qpx, HasQPX); in AddPPCTargetArgs()
1501 if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) in AddPPCTargetArgs()
1530 Arg *A = Args.getLastArg(options::OPT_mabi_EQ); in hasPPCAbiArg()
1536 if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { in getR600TargetGPU()
1558 Args.getLastArg(options::OPT_msoft_float, options::OPT_mhard_float)) { in AddSparcTargetArgs()
1559 if (A->getOption().matches(options::OPT_msoft_float)) in AddSparcTargetArgs()
1575 if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) in getSystemZTargetCPU()
1583 if (Arg *A = Args.getLastArg(options::OPT_mhtm, options::OPT_mno_htm)) { in getSystemZTargetFeatures()
1584 if (A->getOption().matches(options::OPT_mhtm)) in getSystemZTargetFeatures()
1590 if (Arg *A = Args.getLastArg(options::OPT_mvx, options::OPT_mno_vx)) { in getSystemZTargetFeatures()
1591 if (A->getOption().matches(options::OPT_mvx)) in getSystemZTargetFeatures()
1600 if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) { in getX86TargetCPU()
1618 if (const Arg *A = Args.getLastArg(options::OPT__SLASH_arch)) { in getX86TargetCPU()
1685 if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { in getWebAssemblyTargetCPU()
1731 if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) in getCPUName()
1756 if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) in getCPUName()
1799 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { in AddGoldPlugin()
1801 if (A->getOption().matches(options::OPT_O4) || in AddGoldPlugin()
1802 A->getOption().matches(options::OPT_Ofast)) in AddGoldPlugin()
1804 else if (A->getOption().matches(options::OPT_O)) in AddGoldPlugin()
1806 else if (A->getOption().matches(options::OPT_O0)) in AddGoldPlugin()
1855 Arg *A = Args.getLastArg(options::OPT_mrecip, options::OPT_mrecip_EQ); in ParseMRecip()
1951 if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) { in getX86TargetFeatures()
1983 if (Arg *A = Args.getLastArg(options::OPT__SLASH_arch)) { in getX86TargetFeatures()
2008 for (const Arg *A : Args.filtered(options::OPT_m_x86_Features_Group)) { in getX86TargetFeatures()
2026 if (!Args.hasFlag(options::OPT_mred_zone, options::OPT_mno_red_zone, true) || in AddX86TargetArgs()
2027 Args.hasArg(options::OPT_mkernel) || in AddX86TargetArgs()
2028 Args.hasArg(options::OPT_fapple_kext)) in AddX86TargetArgs()
2033 bool NoImplicitFloat = (Args.hasArg(options::OPT_mkernel) || in AddX86TargetArgs()
2034 Args.hasArg(options::OPT_fapple_kext)); in AddX86TargetArgs()
2036 options::OPT_msoft_float, options::OPT_mno_soft_float, in AddX86TargetArgs()
2037 options::OPT_mimplicit_float, options::OPT_mno_implicit_float)) { in AddX86TargetArgs()
2039 NoImplicitFloat = (O.matches(options::OPT_mno_implicit_float) || in AddX86TargetArgs()
2040 O.matches(options::OPT_msoft_float)); in AddX86TargetArgs()
2045 if (Arg *A = Args.getLastArg(options::OPT_masm_EQ)) { in AddX86TargetArgs()
2069 if (!Args.hasArg(options::OPT_fno_short_enums)) in AddHexagonTargetArgs()
2071 if (Args.getLastArg(options::OPT_mieee_rnd_near)) { in AddHexagonTargetArgs()
2202 if ((A = Args.getLastArg(options::OPT_march_EQ))) in getAArch64TargetFeatures()
2204 else if ((A = Args.getLastArg(options::OPT_mcpu_EQ))) in getAArch64TargetFeatures()
2206 else if (Args.hasArg(options::OPT_arch)) in getAArch64TargetFeatures()
2210 if (success && (A = Args.getLastArg(options::OPT_mtune_EQ))) in getAArch64TargetFeatures()
2213 else if (success && (A = Args.getLastArg(options::OPT_mcpu_EQ))) in getAArch64TargetFeatures()
2216 else if (Args.hasArg(options::OPT_arch)) in getAArch64TargetFeatures()
2223 if (Args.getLastArg(options::OPT_mgeneral_regs_only)) { in getAArch64TargetFeatures()
2230 if (Arg *A = Args.getLastArg(options::OPT_mcrc, options::OPT_mnocrc)) { in getAArch64TargetFeatures()
2231 if (A->getOption().matches(options::OPT_mcrc)) in getAArch64TargetFeatures()
2237 if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, in getAArch64TargetFeatures()
2238 options::OPT_munaligned_access)) in getAArch64TargetFeatures()
2239 if (A->getOption().matches(options::OPT_mno_unaligned_access)) in getAArch64TargetFeatures()
2242 if (Args.hasArg(options::OPT_ffixed_x18)) in getAArch64TargetFeatures()
2252 if (Opt.matches(options::OPT_mhexagon_hvx)) in getHexagonTargetFeatures()
2254 else if (Opt.matches(options::OPT_mno_hexagon_hvx)) in getHexagonTargetFeatures()
2256 else if (Opt.matches(options::OPT_mhexagon_hvx_double)) in getHexagonTargetFeatures()
2258 else if (Opt.matches(options::OPT_mno_hexagon_hvx_double)) in getHexagonTargetFeatures()
2271 for (const Arg *A : Args.filtered(options::OPT_m_wasm_Features_Group)) { in getWebAssemblyTargetFeatures()
2387 Args.ClaimAllArgs(options::OPT_fexceptions); in addExceptionArgs()
2388 Args.ClaimAllArgs(options::OPT_fno_exceptions); in addExceptionArgs()
2389 Args.ClaimAllArgs(options::OPT_fobjc_exceptions); in addExceptionArgs()
2390 Args.ClaimAllArgs(options::OPT_fno_objc_exceptions); in addExceptionArgs()
2391 Args.ClaimAllArgs(options::OPT_fcxx_exceptions); in addExceptionArgs()
2392 Args.ClaimAllArgs(options::OPT_fno_cxx_exceptions); in addExceptionArgs()
2397 bool EH = Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions, in addExceptionArgs()
2403 Args.hasFlag(options::OPT_fobjc_exceptions, in addExceptionArgs()
2404 options::OPT_fno_objc_exceptions, true)) { in addExceptionArgs()
2417 options::OPT_fcxx_exceptions, options::OPT_fno_cxx_exceptions, in addExceptionArgs()
2418 options::OPT_fexceptions, options::OPT_fno_exceptions); in addExceptionArgs()
2421 ExceptionArg->getOption().matches(options::OPT_fcxx_exceptions) || in addExceptionArgs()
2422 ExceptionArg->getOption().matches(options::OPT_fexceptions); in addExceptionArgs()
2457 return !Args.hasFlag(options::OPT_fautolink, options::OPT_fno_autolink, in ShouldDisableAutolink()
2464 Args.hasFlag(options::OPT_fdwarf_directory_asm, in ShouldDisableDwarfDirectory()
2465 options::OPT_fno_dwarf_directory_asm, TC.useIntegratedAs()); in ShouldDisableDwarfDirectory()
2486 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) in UseRelaxAll()
2487 RelaxDefault = A->getOption().matches(options::OPT_O0); in UseRelaxAll()
2499 return Args.hasFlag(options::OPT_mrelax_all, options::OPT_mno_relax_all, in UseRelaxAll()
2506 assert(A.getOption().matches(options::OPT_gN_Group) && in DebugLevelToInfoKind()
2508 if (A.getOption().matches(options::OPT_g0) || in DebugLevelToInfoKind()
2509 A.getOption().matches(options::OPT_ggdb0)) in DebugLevelToInfoKind()
2511 if (A.getOption().matches(options::OPT_gline_tables_only) || in DebugLevelToInfoKind()
2512 A.getOption().matches(options::OPT_ggdb1)) in DebugLevelToInfoKind()
2574 if (Args.hasFlag(options::OPT_mincremental_linker_compatible, in CollectArgsForIntegratedAssembler()
2575 options::OPT_mno_incremental_linker_compatible, in CollectArgsForIntegratedAssembler()
2590 Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { in CollectArgsForIntegratedAssembler()
2712 const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ); in getOpenMPRuntime()
2736 if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, in addOpenMPRuntime()
2737 options::OPT_fno_openmp, false)) in addOpenMPRuntime()
2804 if (Args.hasArg(options::OPT_shared) || TC.getTriple().isAndroid()) { in collectSanitizerRuntimes()
2870 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) in areOptimizationsEnabled()
2871 return !A->getOption().matches(options::OPT_O0); in areOptimizationsEnabled()
2925 if (Arg *A = Args.getLastArg(options::OPT_fno_omit_frame_pointer, in shouldUseFramePointer()
2926 options::OPT_fomit_frame_pointer)) in shouldUseFramePointer()
2927 return A->getOption().matches(options::OPT_fno_omit_frame_pointer); in shouldUseFramePointer()
2928 if (Args.hasArg(options::OPT_pg)) in shouldUseFramePointer()
2936 if (Arg *A = Args.getLastArg(options::OPT_mno_omit_leaf_frame_pointer, in shouldUseLeafFramePointer()
2937 options::OPT_momit_leaf_frame_pointer)) in shouldUseLeafFramePointer()
2938 return A->getOption().matches(options::OPT_mno_omit_leaf_frame_pointer); in shouldUseLeafFramePointer()
2939 if (Args.hasArg(options::OPT_pg)) in shouldUseLeafFramePointer()
2958 Arg *FinalOutput = Args.getLastArg(options::OPT_o); in SplitDebugName()
2959 if (FinalOutput && Args.hasArg(options::OPT_c)) { in SplitDebugName()
2966 Args.getLastArgValue(options::OPT_fdebug_compilation_dir)); in SplitDebugName()
3001 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { in shouldEnableVectorizerAtOLevel()
3002 if (A->getOption().matches(options::OPT_O4) || in shouldEnableVectorizerAtOLevel()
3003 A->getOption().matches(options::OPT_Ofast)) in shouldEnableVectorizerAtOLevel()
3006 if (A->getOption().matches(options::OPT_O0)) in shouldEnableVectorizerAtOLevel()
3009 assert(A->getOption().matches(options::OPT_O) && "Must have a -O flag"); in shouldEnableVectorizerAtOLevel()
3035 if (Args.hasArg(options::OPT_verify_pch) && Input.getType() == types::TY_PCH) in addDashXForInput()
3039 if (Args.hasArg(options::OPT_rewrite_objc)) in addDashXForInput()
3064 Args.ClaimAllArgs(options::OPT_flto_EQ); in claimNoWarnArgs()
3065 Args.ClaimAllArgs(options::OPT_flto); in claimNoWarnArgs()
3066 Args.ClaimAllArgs(options::OPT_fno_lto); in claimNoWarnArgs()
3105 if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, in getMSVCVersion()
3107 Args.hasArg(options::OPT_fmsc_version) || in getMSVCVersion()
3108 Args.hasArg(options::OPT_fms_compatibility_version)) { in getMSVCVersion()
3109 const Arg *MSCVersion = Args.getLastArg(options::OPT_fmsc_version); in getMSVCVersion()
3111 Args.getLastArg(options::OPT_fms_compatibility_version); in getMSVCVersion()
3152 options::OPT_fprofile_instr_generate, in addPGOAndCoverageFlags()
3153 options::OPT_fprofile_instr_generate_EQ, options::OPT_fprofile_generate, in addPGOAndCoverageFlags()
3154 options::OPT_fprofile_generate_EQ, in addPGOAndCoverageFlags()
3155 options::OPT_fno_profile_instr_generate); in addPGOAndCoverageFlags()
3158 options::OPT_fno_profile_instr_generate)) in addPGOAndCoverageFlags()
3162 options::OPT_fprofile_instr_use, options::OPT_fprofile_instr_use_EQ, in addPGOAndCoverageFlags()
3163 options::OPT_fprofile_use, options::OPT_fprofile_use_EQ, in addPGOAndCoverageFlags()
3164 options::OPT_fno_profile_instr_use); in addPGOAndCoverageFlags()
3166 ProfileUseArg->getOption().matches(options::OPT_fno_profile_instr_use)) in addPGOAndCoverageFlags()
3175 options::OPT_fprofile_instr_generate_EQ)) in addPGOAndCoverageFlags()
3178 options::OPT_fprofile_generate_EQ)) { in addPGOAndCoverageFlags()
3184 Args.AddAllArgs(CmdArgs, options::OPT_fprofile_instr_generate); in addPGOAndCoverageFlags()
3188 if (ProfileUseArg->getOption().matches(options::OPT_fprofile_instr_use_EQ)) in addPGOAndCoverageFlags()
3191 options::OPT_fprofile_use_EQ) || in addPGOAndCoverageFlags()
3193 options::OPT_fprofile_instr_use))) { in addPGOAndCoverageFlags()
3203 if (Args.hasArg(options::OPT_ftest_coverage) || in addPGOAndCoverageFlags()
3204 Args.hasArg(options::OPT_coverage)) in addPGOAndCoverageFlags()
3206 if (Args.hasFlag(options::OPT_fprofile_arcs, options::OPT_fno_profile_arcs, in addPGOAndCoverageFlags()
3208 Args.hasArg(options::OPT_coverage)) in addPGOAndCoverageFlags()
3211 if (Args.hasFlag(options::OPT_fcoverage_mapping, in addPGOAndCoverageFlags()
3212 options::OPT_fno_coverage_mapping, false) && in addPGOAndCoverageFlags()
3218 if (Args.hasFlag(options::OPT_fcoverage_mapping, in addPGOAndCoverageFlags()
3219 options::OPT_fno_coverage_mapping, false)) in addPGOAndCoverageFlags()
3222 if (C.getArgs().hasArg(options::OPT_c) || in addPGOAndCoverageFlags()
3223 C.getArgs().hasArg(options::OPT_S)) { in addPGOAndCoverageFlags()
3227 if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) { in addPGOAndCoverageFlags()
3246 if ((Args.hasFlag(options::OPT_fprofile_arcs, options::OPT_fno_profile_arcs, in addPS4ProfileRTArgs()
3248 Args.hasFlag(options::OPT_fprofile_generate, in addPS4ProfileRTArgs()
3249 options::OPT_fno_profile_instr_generate, false) || in addPS4ProfileRTArgs()
3250 Args.hasFlag(options::OPT_fprofile_generate_EQ, in addPS4ProfileRTArgs()
3251 options::OPT_fno_profile_instr_generate, false) || in addPS4ProfileRTArgs()
3252 Args.hasFlag(options::OPT_fprofile_instr_generate, in addPS4ProfileRTArgs()
3253 options::OPT_fno_profile_instr_generate, false) || in addPS4ProfileRTArgs()
3254 Args.hasFlag(options::OPT_fprofile_instr_generate_EQ, in addPS4ProfileRTArgs()
3255 options::OPT_fno_profile_instr_generate, false) || in addPS4ProfileRTArgs()
3256 Args.hasArg(options::OPT_fcreate_profile) || in addPS4ProfileRTArgs()
3257 Args.hasArg(options::OPT_coverage))) in addPS4ProfileRTArgs()
3273 if (ToolChain.getTriple().isOSDarwin() && Args.hasArg(options::OPT_static)) in ParsePICArgs()
3278 Args.hasArg(options::OPT_mkernel, options::OPT_fapple_kext); in ParsePICArgs()
3332 Arg *LastPICArg = Args.getLastArg(options::OPT_fPIC, options::OPT_fno_PIC, in ParsePICArgs()
3333 options::OPT_fpic, options::OPT_fno_pic, in ParsePICArgs()
3334 options::OPT_fPIE, options::OPT_fno_PIE, in ParsePICArgs()
3335 options::OPT_fpie, options::OPT_fno_pie); in ParsePICArgs()
3341 if (O.matches(options::OPT_fPIC) || O.matches(options::OPT_fpic) || in ParsePICArgs()
3342 O.matches(options::OPT_fPIE) || O.matches(options::OPT_fpie)) { in ParsePICArgs()
3343 PIE = O.matches(options::OPT_fPIE) || O.matches(options::OPT_fpie); in ParsePICArgs()
3345 PIE || O.matches(options::OPT_fPIC) || O.matches(options::OPT_fpic); in ParsePICArgs()
3347 O.matches(options::OPT_fPIE) || O.matches(options::OPT_fPIC); in ParsePICArgs()
3351 Arg *ModelArg = Args.getLastArg(options::OPT_mcmodel_EQ); in ParsePICArgs()
3375 if (Arg *A = Args.getLastArg(options::OPT_mdynamic_no_pic)) { in ParsePICArgs()
3431 Args.hasArg(options::OPT_mkernel, options::OPT_fapple_kext); in ConstructJob()
3506 if (Args.hasArg(options::OPT_rewrite_objc) && in ConstructJob()
3507 !Args.hasArg(options::OPT_g_Group)) in ConstructJob()
3516 (void)Args.hasArg(options::OPT_force__cpusubtype__ALL); in ConstructJob()
3564 Args.AddLastArg(CmdArgs, options::OPT_flto, options::OPT_flto_EQ); in ConstructJob()
3567 if (const Arg *A = Args.getLastArg(options::OPT_fthinlto_index_EQ)) { in ConstructJob()
3571 Args.AddLastArg(CmdArgs, options::OPT_fthinlto_index_EQ); in ConstructJob()
3592 if (Args.hasArg(options::OPT_static)) in ConstructJob()
3605 if (!Args.hasArg(options::OPT__analyzer_no_default_checks)) { in ConstructJob()
3637 if (Arg *A = Args.getLastArg(options::OPT__analyzer_output)) in ConstructJob()
3648 Args.AddAllArgValues(CmdArgs, options::OPT_Xanalyzer); in ConstructJob()
3673 if (Arg *A = Args.getLastArg(options::OPT_meabi)) { in ConstructJob()
3679 if (Arg *A = Args.getLastArg(options::OPT_mthread_model)) in ConstructJob()
3684 Args.AddLastArg(CmdArgs, options::OPT_fveclib); in ConstructJob()
3686 if (!Args.hasFlag(options::OPT_fmerge_all_constants, in ConstructJob()
3687 options::OPT_fno_merge_all_constants)) in ConstructJob()
3692 if (Args.hasArg(options::OPT_frewrite_map_file) || in ConstructJob()
3693 Args.hasArg(options::OPT_frewrite_map_file_EQ)) { in ConstructJob()
3694 for (const Arg *A : Args.filtered(options::OPT_frewrite_map_file, in ConstructJob()
3695 options::OPT_frewrite_map_file_EQ)) { in ConstructJob()
3702 if (Arg *A = Args.getLastArg(options::OPT_Wframe_larger_than_EQ)) { in ConstructJob()
3709 if (Arg *A = Args.getLastArg(options::OPT_mregparm_EQ)) { in ConstructJob()
3714 if (Arg *A = Args.getLastArg(options::OPT_fpcc_struct_return, in ConstructJob()
3715 options::OPT_freg_struct_return)) { in ConstructJob()
3719 } else if (A->getOption().matches(options::OPT_fpcc_struct_return)) { in ConstructJob()
3722 assert(A->getOption().matches(options::OPT_freg_struct_return)); in ConstructJob()
3727 if (Args.hasFlag(options::OPT_mrtd, options::OPT_mno_rtd, false)) in ConstructJob()
3732 if (!Args.hasFlag(options::OPT_fzero_initialized_in_bss, in ConstructJob()
3733 options::OPT_fno_zero_initialized_in_bss)) in ConstructJob()
3740 OFastEnabled ? options::OPT_Ofast : options::OPT_fstrict_aliasing; in ConstructJob()
3744 if (!Args.hasFlag(options::OPT_fstrict_aliasing, StrictAliasingAliasOption, in ConstructJob()
3745 options::OPT_fno_strict_aliasing, TBAAOnByDefault)) in ConstructJob()
3747 if (!Args.hasFlag(options::OPT_fstruct_path_tbaa, in ConstructJob()
3748 options::OPT_fno_struct_path_tbaa)) in ConstructJob()
3750 if (Args.hasFlag(options::OPT_fstrict_enums, options::OPT_fno_strict_enums, in ConstructJob()
3753 if (Args.hasFlag(options::OPT_fstrict_vtable_pointers, in ConstructJob()
3754 options::OPT_fno_strict_vtable_pointers, in ConstructJob()
3757 if (!Args.hasFlag(options::OPT_foptimize_sibling_calls, in ConstructJob()
3758 options::OPT_fno_optimize_sibling_calls)) in ConstructJob()
3762 if (Args.hasArg(options::OPT_fsplit_stack)) in ConstructJob()
3768 OFastEnabled ? options::OPT_Ofast : options::OPT_ffast_math; in ConstructJob()
3776 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3777 options::OPT_fno_fast_math, options::OPT_ffinite_math_only, in ConstructJob()
3778 options::OPT_fno_finite_math_only, options::OPT_fhonor_infinities, in ConstructJob()
3779 options::OPT_fno_honor_infinities)) in ConstructJob()
3780 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3781 A->getOption().getID() != options::OPT_fno_finite_math_only && in ConstructJob()
3782 A->getOption().getID() != options::OPT_fhonor_infinities) in ConstructJob()
3785 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3786 options::OPT_fno_fast_math, options::OPT_ffinite_math_only, in ConstructJob()
3787 options::OPT_fno_finite_math_only, options::OPT_fhonor_nans, in ConstructJob()
3788 options::OPT_fno_honor_nans)) in ConstructJob()
3789 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3790 A->getOption().getID() != options::OPT_fno_finite_math_only && in ConstructJob()
3791 A->getOption().getID() != options::OPT_fhonor_nans) in ConstructJob()
3797 Args.getLastArg(options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3798 options::OPT_fno_fast_math, options::OPT_fmath_errno, in ConstructJob()
3799 options::OPT_fno_math_errno)) { in ConstructJob()
3803 if (A->getOption().getID() == options::OPT_fno_math_errno || in ConstructJob()
3804 A->getOption().getID() == options::OPT_ffast_math || in ConstructJob()
3805 A->getOption().getID() == options::OPT_Ofast) in ConstructJob()
3807 else if (A->getOption().getID() == options::OPT_fmath_errno) in ConstructJob()
3819 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3820 options::OPT_fno_fast_math, options::OPT_funsafe_math_optimizations, in ConstructJob()
3821 options::OPT_fno_unsafe_math_optimizations, in ConstructJob()
3822 options::OPT_fassociative_math, options::OPT_fno_associative_math)) in ConstructJob()
3823 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3824 A->getOption().getID() != options::OPT_fno_unsafe_math_optimizations && in ConstructJob()
3825 A->getOption().getID() != options::OPT_fno_associative_math) in ConstructJob()
3829 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3830 options::OPT_fno_fast_math, options::OPT_funsafe_math_optimizations, in ConstructJob()
3831 options::OPT_fno_unsafe_math_optimizations, in ConstructJob()
3832 options::OPT_freciprocal_math, options::OPT_fno_reciprocal_math)) in ConstructJob()
3833 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3834 A->getOption().getID() != options::OPT_fno_unsafe_math_optimizations && in ConstructJob()
3835 A->getOption().getID() != options::OPT_fno_reciprocal_math) in ConstructJob()
3839 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3840 options::OPT_fno_fast_math, options::OPT_funsafe_math_optimizations, in ConstructJob()
3841 options::OPT_fno_unsafe_math_optimizations, in ConstructJob()
3842 options::OPT_fsigned_zeros, options::OPT_fno_signed_zeros)) in ConstructJob()
3843 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3844 A->getOption().getID() != options::OPT_fno_unsafe_math_optimizations && in ConstructJob()
3845 A->getOption().getID() != options::OPT_fsigned_zeros) in ConstructJob()
3849 options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3850 options::OPT_fno_fast_math, options::OPT_funsafe_math_optimizations, in ConstructJob()
3851 options::OPT_fno_unsafe_math_optimizations, in ConstructJob()
3852 options::OPT_ftrapping_math, options::OPT_fno_trapping_math)) in ConstructJob()
3853 if (A->getOption().getID() != options::OPT_fno_fast_math && in ConstructJob()
3854 A->getOption().getID() != options::OPT_fno_unsafe_math_optimizations && in ConstructJob()
3855 A->getOption().getID() != options::OPT_ftrapping_math) in ConstructJob()
3868 if (Arg *A = Args.getLastArg(options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3869 options::OPT_fno_fast_math, in ConstructJob()
3870 options::OPT_ffp_contract)) { in ConstructJob()
3871 if (A->getOption().getID() == options::OPT_ffp_contract) { in ConstructJob()
3879 } else if (A->getOption().matches(options::OPT_ffast_math) || in ConstructJob()
3880 (OFastEnabled && A->getOption().matches(options::OPT_Ofast))) { in ConstructJob()
3893 if (Arg *A = Args.getLastArg(options::OPT_ffast_math, FastMathAliasOption, in ConstructJob()
3894 options::OPT_fno_fast_math)) in ConstructJob()
3895 if (!A->getOption().matches(options::OPT_fno_fast_math)) in ConstructJob()
3897 if (Arg *A = Args.getLastArg(options::OPT_ffinite_math_only, in ConstructJob()
3898 options::OPT_fno_fast_math)) in ConstructJob()
3899 if (A->getOption().matches(options::OPT_ffinite_math_only)) in ConstructJob()
3906 if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm, in ConstructJob()
3908 Args.hasArg(options::OPT_dA)) in ConstructJob()
3911 if (!Args.hasFlag(options::OPT_fintegrated_as, options::OPT_fno_integrated_as, in ConstructJob()
3915 if (Args.hasArg(options::OPT_fdebug_pass_structure)) { in ConstructJob()
3919 if (Args.hasArg(options::OPT_fdebug_pass_arguments)) { in ConstructJob()
3934 if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields, in ConstructJob()
3943 Args.hasFlag(options::OPT_fasynchronous_unwind_tables, in ConstructJob()
3944 options::OPT_fno_asynchronous_unwind_tables, in ConstructJob()
3948 if (Args.hasFlag(options::OPT_funwind_tables, options::OPT_fno_unwind_tables, in ConstructJob()
3954 if (Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) { in ConstructJob()
3960 (void)Args.hasArg(options::OPT_mtune_EQ); in ConstructJob()
3962 if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) { in ConstructJob()
3974 if (const Arg *A = Args.getLastArg(options::OPT_mfpmath_EQ)) { in ConstructJob()
4050 if (Arg *A = Args.getLastArg(options::OPT_mlinker_version_EQ)) { in ConstructJob()
4061 if (!Args.hasArg(options::OPT_fallow_unsupported)) { in ConstructJob()
4065 if ((Unsupported = Args.getLastArg(options::OPT_fapple_kext)) || in ConstructJob()
4066 (Unsupported = Args.getLastArg(options::OPT_mkernel))) in ConstructJob()
4072 Args.AddAllArgs(CmdArgs, options::OPT_v); in ConstructJob()
4073 Args.AddLastArg(CmdArgs, options::OPT_H); in ConstructJob()
4079 Args.AddLastArg(CmdArgs, options::OPT_P); in ConstructJob()
4080 Args.AddLastArg(CmdArgs, options::OPT_print_ivar_layout); in ConstructJob()
4088 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
4089 Arg *SplitDwarfArg = Args.getLastArg(options::OPT_gsplit_dwarf); in ConstructJob()
4090 if (Arg *A = Args.getLastArg(options::OPT_g_Group)) { in ConstructJob()
4092 if (A->getOption().matches(options::OPT_gN_Group)) { in ConstructJob()
4106 if (Arg *A = Args.getLastArg(options::OPT_gTune_Group, in ConstructJob()
4107 options::OPT_ggdbN_Group)) { in ConstructJob()
4108 if (A->getOption().matches(options::OPT_glldb)) in ConstructJob()
4110 else if (A->getOption().matches(options::OPT_gsce)) in ConstructJob()
4117 if (Arg *A = Args.getLastArg(options::OPT_gdwarf_2, options::OPT_gdwarf_3, in ConstructJob()
4118 options::OPT_gdwarf_4)) in ConstructJob()
4123 if (Args.hasArg(options::OPT_gcodeview) || EmitCodeView) { in ConstructJob()
4132 Args.ClaimAllArgs(options::OPT_g_flags_Group); in ConstructJob()
4135 if (Args.hasFlag(options::OPT_gcolumn_info, options::OPT_gno_column_info, in ConstructJob()
4140 if (Args.hasArg(options::OPT_gmodules)) { in ConstructJob()
4160 bool NeedFullDebug = Args.hasFlag(options::OPT_fstandalone_debug, in ConstructJob()
4161 options::OPT_fno_standalone_debug, in ConstructJob()
4169 if (Args.hasArg(options::OPT_ggnu_pubnames)) { in ConstructJob()
4177 if (Args.hasArg(options::OPT_gdwarf_aranges) || IsPS4CPU) { in ConstructJob()
4182 if (Args.hasFlag(options::OPT_fdebug_types_section, in ConstructJob()
4183 options::OPT_fno_debug_types_section, false)) { in ConstructJob()
4191 if (Args.hasFlag(options::OPT_ffunction_sections, in ConstructJob()
4192 options::OPT_fno_function_sections, UseSeparateSections)) { in ConstructJob()
4196 if (Args.hasFlag(options::OPT_fdata_sections, options::OPT_fno_data_sections, in ConstructJob()
4201 if (!Args.hasFlag(options::OPT_funique_section_names, in ConstructJob()
4202 options::OPT_fno_unique_section_names, true)) in ConstructJob()
4205 Args.AddAllArgs(CmdArgs, options::OPT_finstrument_functions); in ConstructJob()
4214 if (Args.hasArg(options::OPT_nostdinc)) { in ConstructJob()
4218 if (Args.hasArg(options::OPT_nostdlibinc)) in ConstructJob()
4220 Args.AddLastArg(CmdArgs, options::OPT_nostdincxx); in ConstructJob()
4221 Args.AddLastArg(CmdArgs, options::OPT_nobuiltininc); in ConstructJob()
4228 Args.AddLastArg(CmdArgs, options::OPT_working_directory); in ConstructJob()
4231 if (!Args.hasArg(options::OPT_fno_objc_arc, options::OPT_fobjc_arc)) { in ConstructJob()
4232 if (const Arg *A = Args.getLastArg(options::OPT_ccc_arcmt_check, in ConstructJob()
4233 options::OPT_ccc_arcmt_modify, in ConstructJob()
4234 options::OPT_ccc_arcmt_migrate)) { in ConstructJob()
4239 case options::OPT_ccc_arcmt_check: in ConstructJob()
4242 case options::OPT_ccc_arcmt_modify: in ConstructJob()
4245 case options::OPT_ccc_arcmt_migrate: in ConstructJob()
4250 Args.AddLastArg(CmdArgs, options::OPT_arcmt_migrate_report_output); in ConstructJob()
4251 Args.AddLastArg(CmdArgs, options::OPT_arcmt_migrate_emit_arc_errors); in ConstructJob()
4256 Args.ClaimAllArgs(options::OPT_ccc_arcmt_check); in ConstructJob()
4257 Args.ClaimAllArgs(options::OPT_ccc_arcmt_modify); in ConstructJob()
4258 Args.ClaimAllArgs(options::OPT_ccc_arcmt_migrate); in ConstructJob()
4261 if (const Arg *A = Args.getLastArg(options::OPT_ccc_objcmt_migrate)) { in ConstructJob()
4269 if (!Args.hasArg(options::OPT_objcmt_migrate_literals, in ConstructJob()
4270 options::OPT_objcmt_migrate_subscripting, in ConstructJob()
4271 options::OPT_objcmt_migrate_property)) { in ConstructJob()
4277 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_literals); in ConstructJob()
4278 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_subscripting); in ConstructJob()
4279 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property); in ConstructJob()
4282 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_literals); in ConstructJob()
4283 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_subscripting); in ConstructJob()
4284 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property); in ConstructJob()
4285 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_all); in ConstructJob()
4286 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_readonly_property); in ConstructJob()
4287 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_readwrite_property); in ConstructJob()
4288 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property_dot_syntax); in ConstructJob()
4289 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_annotation); in ConstructJob()
4290 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_instancetype); in ConstructJob()
4291 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_nsmacros); in ConstructJob()
4292 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_protocol_conformance); in ConstructJob()
4293 Args.AddLastArg(CmdArgs, options::OPT_objcmt_atomic_property); in ConstructJob()
4294 Args.AddLastArg(CmdArgs, options::OPT_objcmt_returns_innerpointer_property); in ConstructJob()
4295 Args.AddLastArg(CmdArgs, options::OPT_objcmt_ns_nonatomic_iosonly); in ConstructJob()
4296 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_designated_init); in ConstructJob()
4297 Args.AddLastArg(CmdArgs, options::OPT_objcmt_whitelist_dir_path); in ConstructJob()
4312 Args.ClaimAllArgs(options::OPT_D); in ConstructJob()
4315 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { in ConstructJob()
4316 if (A->getOption().matches(options::OPT_O4)) { in ConstructJob()
4326 Args.filtered(options::OPT_clang_ignored_gcc_optimization_f_Group)) { in ConstructJob()
4333 Args.AddAllArgs(CmdArgs, options::OPT_R_Group); in ConstructJob()
4334 Args.AddAllArgs(CmdArgs, options::OPT_W_Group); in ConstructJob()
4335 if (Args.hasFlag(options::OPT_pedantic, options::OPT_no_pedantic, false)) in ConstructJob()
4337 Args.AddLastArg(CmdArgs, options::OPT_pedantic_errors); in ConstructJob()
4338 Args.AddLastArg(CmdArgs, options::OPT_w); in ConstructJob()
4346 if (Arg *Std = Args.getLastArg(options::OPT_std_EQ, options::OPT_ansi)) { in ConstructJob()
4347 if (Std->getOption().matches(options::OPT_ansi)) in ConstructJob()
4356 if (Arg *A = Args.getLastArg(options::OPT_std_EQ, options::OPT_ansi, in ConstructJob()
4357 options::OPT_ftrigraphs, in ConstructJob()
4358 options::OPT_fno_trigraphs)) in ConstructJob()
4369 Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ, "-std=", in ConstructJob()
4374 Args.AddLastArg(CmdArgs, options::OPT_ftrigraphs, in ConstructJob()
4375 options::OPT_fno_trigraphs); in ConstructJob()
4391 Args.getLastArg(options::OPT_Wwrite_strings, in ConstructJob()
4392 options::OPT_Wno_write_strings, options::OPT_w); in ConstructJob()
4394 WriteStrings->getOption().matches(options::OPT_Wwrite_strings)) in ConstructJob()
4402 Args.hasFlag(options::OPT_Wdeprecated, options::OPT_Wno_deprecated, in ConstructJob()
4408 if (Arg *Asm = Args.getLastArg(options::OPT_fasm, options::OPT_fno_asm)) { in ConstructJob()
4409 if (Asm->getOption().matches(options::OPT_fasm)) in ConstructJob()
4424 for (const Arg *A : Args.filtered(options::OPT_fdebug_prefix_map_EQ)) { in ConstructJob()
4433 if (Arg *A = Args.getLastArg(options::OPT_ftemplate_depth_, in ConstructJob()
4434 options::OPT_ftemplate_depth_EQ)) { in ConstructJob()
4439 if (Arg *A = Args.getLastArg(options::OPT_foperator_arrow_depth_EQ)) { in ConstructJob()
4444 if (Arg *A = Args.getLastArg(options::OPT_fconstexpr_depth_EQ)) { in ConstructJob()
4449 if (Arg *A = Args.getLastArg(options::OPT_fconstexpr_steps_EQ)) { in ConstructJob()
4454 if (Arg *A = Args.getLastArg(options::OPT_fbracket_depth_EQ)) { in ConstructJob()
4459 if (Arg *A = Args.getLastArg(options::OPT_Wlarge_by_value_copy_EQ, in ConstructJob()
4460 options::OPT_Wlarge_by_value_copy_def)) { in ConstructJob()
4468 if (Args.hasArg(options::OPT_relocatable_pch)) in ConstructJob()
4471 if (Arg *A = Args.getLastArg(options::OPT_fconstant_string_class_EQ)) { in ConstructJob()
4476 if (Arg *A = Args.getLastArg(options::OPT_ftabstop_EQ)) { in ConstructJob()
4482 if (Arg *A = Args.getLastArg(options::OPT_ferror_limit_EQ)) in ConstructJob()
4487 if (Arg *A = Args.getLastArg(options::OPT_fmacro_backtrace_limit_EQ)) { in ConstructJob()
4492 if (Arg *A = Args.getLastArg(options::OPT_ftemplate_backtrace_limit_EQ)) { in ConstructJob()
4497 if (Arg *A = Args.getLastArg(options::OPT_fconstexpr_backtrace_limit_EQ)) { in ConstructJob()
4502 if (Arg *A = Args.getLastArg(options::OPT_fspell_checking_limit_EQ)) { in ConstructJob()
4509 if (Arg *A = Args.getLastArg(options::OPT_fmessage_length_EQ)) { in ConstructJob()
4519 if (const Arg *A = Args.getLastArg(options::OPT_fvisibility_EQ, in ConstructJob()
4520 options::OPT_fvisibility_ms_compat)) { in ConstructJob()
4521 if (A->getOption().matches(options::OPT_fvisibility_EQ)) { in ConstructJob()
4525 assert(A->getOption().matches(options::OPT_fvisibility_ms_compat)); in ConstructJob()
4533 Args.AddLastArg(CmdArgs, options::OPT_fvisibility_inlines_hidden); in ConstructJob()
4535 Args.AddLastArg(CmdArgs, options::OPT_ftlsmodel_EQ); in ConstructJob()
4538 if (Args.hasFlag(options::OPT_ffreestanding, options::OPT_fhosted, false) || in ConstructJob()
4543 Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); in ConstructJob()
4544 Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions); in ConstructJob()
4545 Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names); in ConstructJob()
4549 if (Args.hasFlag(options::OPT_femulated_tls, options::OPT_fno_emulated_tls, in ConstructJob()
4554 Args.AddLastArg(CmdArgs, options::OPT_faltivec); in ConstructJob()
4555 Args.AddLastArg(CmdArgs, options::OPT_fzvector); in ConstructJob()
4557 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_show_template_tree); in ConstructJob()
4558 Args.AddLastArg(CmdArgs, options::OPT_fno_elide_type); in ConstructJob()
4561 if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, in ConstructJob()
4562 options::OPT_fno_openmp, false)) in ConstructJob()
4572 if (!Args.hasFlag(options::OPT_fopenmp_use_tls, in ConstructJob()
4573 options::OPT_fnoopenmp_use_tls, /*Default=*/true)) in ConstructJob()
4590 if (const Arg *A = Args.getLastArg(options::OPT_faltivec)) { in ConstructJob()
4599 if (Arg *A = Args.getLastArg(options::OPT_fzvector)) in ConstructJob()
4600 if (Args.hasArg(options::OPT_faltivec)) in ConstructJob()
4605 Args.AddLastArg(CmdArgs, options::OPT_pg); in ConstructJob()
4608 if (!Args.hasFlag(options::OPT_flax_vector_conversions, in ConstructJob()
4609 options::OPT_fno_lax_vector_conversions)) in ConstructJob()
4612 if (Args.getLastArg(options::OPT_fapple_kext) || in ConstructJob()
4613 (Args.hasArg(options::OPT_mkernel) && types::isCXX(InputType))) in ConstructJob()
4616 Args.AddLastArg(CmdArgs, options::OPT_fobjc_sender_dependent_dispatch); in ConstructJob()
4617 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_print_source_range_info); in ConstructJob()
4618 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_parseable_fixits); in ConstructJob()
4619 Args.AddLastArg(CmdArgs, options::OPT_ftime_report); in ConstructJob()
4620 Args.AddLastArg(CmdArgs, options::OPT_ftrapv); in ConstructJob()
4622 if (Arg *A = Args.getLastArg(options::OPT_ftrapv_handler_EQ)) { in ConstructJob()
4627 Args.AddLastArg(CmdArgs, options::OPT_ftrap_function_EQ); in ConstructJob()
4631 if (Arg *A = Args.getLastArg(options::OPT_fwrapv, options::OPT_fno_wrapv)) { in ConstructJob()
4632 if (A->getOption().matches(options::OPT_fwrapv)) in ConstructJob()
4634 } else if (Arg *A = Args.getLastArg(options::OPT_fstrict_overflow, in ConstructJob()
4635 options::OPT_fno_strict_overflow)) { in ConstructJob()
4636 if (A->getOption().matches(options::OPT_fno_strict_overflow)) in ConstructJob()
4640 if (Arg *A = Args.getLastArg(options::OPT_freroll_loops, in ConstructJob()
4641 options::OPT_fno_reroll_loops)) in ConstructJob()
4642 if (A->getOption().matches(options::OPT_freroll_loops)) in ConstructJob()
4645 Args.AddLastArg(CmdArgs, options::OPT_fwritable_strings); in ConstructJob()
4646 Args.AddLastArg(CmdArgs, options::OPT_funroll_loops, in ConstructJob()
4647 options::OPT_fno_unroll_loops); in ConstructJob()
4649 Args.AddLastArg(CmdArgs, options::OPT_pthread); in ConstructJob()
4654 Args.ClaimAllArgs(options::OPT_fno_stack_protector); in ConstructJob()
4655 Args.ClaimAllArgs(options::OPT_fstack_protector_all); in ConstructJob()
4656 Args.ClaimAllArgs(options::OPT_fstack_protector_strong); in ConstructJob()
4657 Args.ClaimAllArgs(options::OPT_fstack_protector); in ConstructJob()
4658 } else if (Arg *A = Args.getLastArg(options::OPT_fno_stack_protector, in ConstructJob()
4659 options::OPT_fstack_protector_all, in ConstructJob()
4660 options::OPT_fstack_protector_strong, in ConstructJob()
4661 options::OPT_fstack_protector)) { in ConstructJob()
4662 if (A->getOption().matches(options::OPT_fstack_protector)) { in ConstructJob()
4666 } else if (A->getOption().matches(options::OPT_fstack_protector_strong)) in ConstructJob()
4668 else if (A->getOption().matches(options::OPT_fstack_protector_all)) in ConstructJob()
4680 for (const Arg *A : Args.filtered(options::OPT__param)) { in ConstructJob()
4693 if (Args.hasFlag(options::OPT_mstackrealign, options::OPT_mno_stackrealign, in ConstructJob()
4697 if (Args.hasArg(options::OPT_mstack_alignment)) { in ConstructJob()
4698 StringRef alignment = Args.getLastArgValue(options::OPT_mstack_alignment); in ConstructJob()
4702 if (Args.hasArg(options::OPT_mstack_probe_size)) { in ConstructJob()
4703 StringRef Size = Args.getLastArgValue(options::OPT_mstack_probe_size); in ConstructJob()
4725 if (Arg *A = Args.getLastArg(options::OPT_mrestrict_it, in ConstructJob()
4726 options::OPT_mno_restrict_it)) { in ConstructJob()
4727 if (A->getOption().matches(options::OPT_mrestrict_it)) { in ConstructJob()
4744 if (Arg *A = Args.getLastArg(options::OPT_fprofile_sample_use_EQ)) { in ConstructJob()
4753 if (!Args.hasFlag(options::OPT_fbuiltin, options::OPT_fno_builtin, in ConstructJob()
4754 !Args.hasArg(options::OPT_mkernel))) in ConstructJob()
4757 if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, in ConstructJob()
4758 options::OPT_fno_assume_sane_operator_new)) in ConstructJob()
4762 if (Args.hasFlag(options::OPT_fblocks, options::OPT_fno_blocks, in ConstructJob()
4764 (Args.hasArg(options::OPT_fgnu_runtime) && in ConstructJob()
4765 Args.hasArg(options::OPT_fobjc_nonfragile_abi) && in ConstructJob()
4766 !Args.hasArg(options::OPT_fno_blocks))) { in ConstructJob()
4769 if (!Args.hasArg(options::OPT_fgnu_runtime) && in ConstructJob()
4778 if (Args.hasFlag(options::OPT_fmodules, options::OPT_fno_modules, false)) { in ConstructJob()
4779 bool AllowedInCXX = Args.hasFlag(options::OPT_fcxx_modules, in ConstructJob()
4780 options::OPT_fno_cxx_modules, true); in ConstructJob()
4789 if (Args.hasFlag(options::OPT_fimplicit_module_maps, in ConstructJob()
4790 options::OPT_fno_implicit_module_maps, HaveModules)) { in ConstructJob()
4796 if (Args.hasFlag(options::OPT_fmodules_decluse, in ConstructJob()
4797 options::OPT_fno_modules_decluse, false)) { in ConstructJob()
4803 if (Args.hasFlag(options::OPT_fmodules_strict_decluse, in ConstructJob()
4804 options::OPT_fno_modules_strict_decluse, false)) { in ConstructJob()
4809 if (!Args.hasFlag(options::OPT_fimplicit_modules, in ConstructJob()
4810 options::OPT_fno_implicit_modules)) { in ConstructJob()
4816 Args.AddLastArg(CmdArgs, options::OPT_fmodule_name); in ConstructJob()
4820 Args.AddAllArgs(CmdArgs, options::OPT_fmodule_map_file); in ConstructJob()
4824 Args.AddAllArgs(CmdArgs, options::OPT_fmodule_file); in ConstructJob()
4826 Args.ClaimAllArgs(options::OPT_fmodule_file); in ConstructJob()
4831 if (Arg *A = Args.getLastArg(options::OPT_fmodules_cache_path)) in ConstructJob()
4866 Args.AddLastArg(CmdArgs, options::OPT_fmodules_user_build_path); in ConstructJob()
4869 Args.AddAllArgs(CmdArgs, options::OPT_fmodules_ignore_macro); in ConstructJob()
4870 Args.AddLastArg(CmdArgs, options::OPT_fmodules_prune_interval); in ConstructJob()
4871 Args.AddLastArg(CmdArgs, options::OPT_fmodules_prune_after); in ConstructJob()
4873 Args.AddLastArg(CmdArgs, options::OPT_fbuild_session_timestamp); in ConstructJob()
4875 if (Arg *A = Args.getLastArg(options::OPT_fbuild_session_file)) { in ConstructJob()
4876 if (Args.hasArg(options::OPT_fbuild_session_timestamp)) in ConstructJob()
4888 if (Args.getLastArg(options::OPT_fmodules_validate_once_per_build_session)) { in ConstructJob()
4889 if (!Args.getLastArg(options::OPT_fbuild_session_timestamp, in ConstructJob()
4890 options::OPT_fbuild_session_file)) in ConstructJob()
4894 options::OPT_fmodules_validate_once_per_build_session); in ConstructJob()
4897 Args.AddLastArg(CmdArgs, options::OPT_fmodules_validate_system_headers); in ConstructJob()
4900 if (Args.hasFlag(options::OPT_fno_access_control, in ConstructJob()
4901 options::OPT_faccess_control, false)) in ConstructJob()
4905 if (Args.hasFlag(options::OPT_fno_elide_constructors, in ConstructJob()
4906 options::OPT_felide_constructors, false)) in ConstructJob()
4917 if (Args.hasFlag(options::OPT_fshort_enums, options::OPT_fno_short_enums, in ConstructJob()
4923 options::OPT_fsigned_char, options::OPT_fno_signed_char, in ConstructJob()
4924 options::OPT_funsigned_char, options::OPT_fno_unsigned_char)) { in ConstructJob()
4925 if (A->getOption().matches(options::OPT_funsigned_char) || in ConstructJob()
4926 A->getOption().matches(options::OPT_fno_signed_char)) { in ConstructJob()
4935 options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit, in ConstructJob()
4947 if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, in ConstructJob()
4952 if (Args.hasFlag(options::OPT_fuse_line_directives, in ConstructJob()
4953 options::OPT_fno_use_line_directives, false)) in ConstructJob()
4957 if (Args.hasFlag(options::OPT_fms_compatibility, in ConstructJob()
4958 options::OPT_fno_ms_compatibility, in ConstructJob()
4960 Args.hasFlag(options::OPT_fms_extensions, in ConstructJob()
4961 options::OPT_fno_ms_extensions, true)))) in ConstructJob()
4980 if (Args.hasFlag(options::OPT_fborland_extensions, in ConstructJob()
4981 options::OPT_fno_borland_extensions, false)) in ConstructJob()
4985 if (Args.hasFlag(options::OPT_fdeclspec, options::OPT_fno_declspec, in ConstructJob()
4988 else if (Args.hasArg(options::OPT_fno_declspec)) in ConstructJob()
4993 if (!Args.hasFlag(options::OPT_fthreadsafe_statics, in ConstructJob()
4994 options::OPT_fno_threadsafe_statics, in ConstructJob()
5000 if (Args.hasFlag(options::OPT_fdelayed_template_parsing, in ConstructJob()
5001 options::OPT_fno_delayed_template_parsing, IsWindowsMSVC)) in ConstructJob()
5006 if (Arg *A = Args.getLastArg(options::OPT_fgnu_keywords, in ConstructJob()
5007 options::OPT_fno_gnu_keywords)) in ConstructJob()
5010 if (Args.hasFlag(options::OPT_fgnu89_inline, options::OPT_fno_gnu89_inline, in ConstructJob()
5014 if (Args.hasArg(options::OPT_fno_inline)) in ConstructJob()
5017 if (Args.hasArg(options::OPT_fno_inline_functions)) in ConstructJob()
5027 if (!Args.hasFlag(options::OPT_fobjc_legacy_dispatch, in ConstructJob()
5028 options::OPT_fno_objc_legacy_dispatch, in ConstructJob()
5073 if (Args.hasFlag(options::OPT_fobjc_arc_exceptions, in ConstructJob()
5074 options::OPT_fno_objc_arc_exceptions, in ConstructJob()
5087 const Arg *GCArg = Args.getLastArg(options::OPT_fobjc_gc_only); in ConstructJob()
5089 GCArg = Args.getLastArg(options::OPT_fobjc_gc); in ConstructJob()
5103 auto WeakArg = Args.getLastArg(options::OPT_fobjc_weak, in ConstructJob()
5104 options::OPT_fno_objc_weak); in ConstructJob()
5108 if (WeakArg->getOption().matches(options::OPT_fobjc_weak)) in ConstructJob()
5111 if (WeakArg->getOption().matches(options::OPT_fobjc_weak)) in ConstructJob()
5118 if (Args.hasFlag(options::OPT_fapplication_extension, in ConstructJob()
5119 options::OPT_fno_application_extension, false)) in ConstructJob()
5131 if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, in ConstructJob()
5132 options::OPT_fno_assume_sane_operator_new)) in ConstructJob()
5137 if (Args.hasFlag(options::OPT_fsized_deallocation, in ConstructJob()
5138 options::OPT_fno_sized_deallocation, false)) in ConstructJob()
5143 if (!Args.hasFlag(options::OPT_fconstant_cfstrings, in ConstructJob()
5144 options::OPT_fno_constant_cfstrings) || in ConstructJob()
5145 !Args.hasFlag(options::OPT_mconstant_cfstrings, in ConstructJob()
5146 options::OPT_mno_constant_cfstrings)) in ConstructJob()
5151 if (Arg *A = Args.getLastArg(options::OPT_fshort_wchar, in ConstructJob()
5152 options::OPT_fno_short_wchar)) in ConstructJob()
5156 if (Args.hasFlag(options::OPT_fpascal_strings, in ConstructJob()
5157 options::OPT_fno_pascal_strings, false)) in ConstructJob()
5162 if (Arg *A = Args.getLastArg(options::OPT_fpack_struct_EQ)) { in ConstructJob()
5166 } else if (Args.hasFlag(options::OPT_fpack_struct, in ConstructJob()
5167 options::OPT_fno_pack_struct, false)) { in ConstructJob()
5172 bool SkipMaxTypeAlign = Args.hasArg(options::OPT_fno_max_type_align); in ConstructJob()
5173 if (Arg *A = Args.getLastArg(options::OPT_fmax_type_align_EQ)) { in ConstructJob()
5189 if (!Args.hasFlag(options::OPT_fcommon, options::OPT_fno_common, in ConstructJob()
5195 if (!Args.hasFlag(options::OPT_fsigned_bitfields, in ConstructJob()
5196 options::OPT_funsigned_bitfields)) in ConstructJob()
5198 << Args.getLastArg(options::OPT_funsigned_bitfields)->getAsString(Args); in ConstructJob()
5201 if (!Args.hasFlag(options::OPT_ffor_scope, options::OPT_fno_for_scope)) in ConstructJob()
5203 << Args.getLastArg(options::OPT_fno_for_scope)->getAsString(Args); in ConstructJob()
5206 if (Arg *inputCharset = Args.getLastArg(options::OPT_finput_charset_EQ)) { in ConstructJob()
5214 if (Arg *execCharset = Args.getLastArg(options::OPT_fexec_charset_EQ)) { in ConstructJob()
5222 if (!Args.hasFlag(options::OPT_fcaret_diagnostics, in ConstructJob()
5223 options::OPT_fno_caret_diagnostics, true)) in ConstructJob()
5227 if (!Args.hasFlag(options::OPT_fdiagnostics_fixit_info, in ConstructJob()
5228 options::OPT_fno_diagnostics_fixit_info)) in ConstructJob()
5232 if (Args.hasFlag(options::OPT_fdiagnostics_show_option, in ConstructJob()
5233 options::OPT_fno_diagnostics_show_option)) in ConstructJob()
5237 Args.getLastArg(options::OPT_fdiagnostics_show_category_EQ)) { in ConstructJob()
5242 if (const Arg *A = Args.getLastArg(options::OPT_fdiagnostics_format_EQ)) { in ConstructJob()
5248 options::OPT_fdiagnostics_show_note_include_stack, in ConstructJob()
5249 options::OPT_fno_diagnostics_show_note_include_stack)) { in ConstructJob()
5251 options::OPT_fdiagnostics_show_note_include_stack)) in ConstructJob()
5264 if (!O.matches(options::OPT_fcolor_diagnostics) && in ConstructJob()
5265 !O.matches(options::OPT_fdiagnostics_color) && in ConstructJob()
5266 !O.matches(options::OPT_fno_color_diagnostics) && in ConstructJob()
5267 !O.matches(options::OPT_fno_diagnostics_color) && in ConstructJob()
5268 !O.matches(options::OPT_fdiagnostics_color_EQ)) in ConstructJob()
5272 if (O.matches(options::OPT_fcolor_diagnostics) || in ConstructJob()
5273 O.matches(options::OPT_fdiagnostics_color)) { in ConstructJob()
5275 } else if (O.matches(options::OPT_fno_color_diagnostics) || in ConstructJob()
5276 O.matches(options::OPT_fno_diagnostics_color)) { in ConstructJob()
5279 assert(O.matches(options::OPT_fdiagnostics_color_EQ)); in ConstructJob()
5296 if (Args.hasArg(options::OPT_fansi_escape_codes)) in ConstructJob()
5299 if (!Args.hasFlag(options::OPT_fshow_source_location, in ConstructJob()
5300 options::OPT_fno_show_source_location)) in ConstructJob()
5303 if (!Args.hasFlag(options::OPT_fshow_column, options::OPT_fno_show_column, in ConstructJob()
5307 if (!Args.hasFlag(options::OPT_fspell_checking, in ConstructJob()
5308 options::OPT_fno_spell_checking)) in ConstructJob()
5312 if (Args.hasFlag(options::OPT_fasm_blocks, options::OPT_fno_asm_blocks, in ConstructJob()
5317 if (!Args.hasFlag(options::OPT_fgnu_inline_asm, in ConstructJob()
5318 options::OPT_fno_gnu_inline_asm, true)) in ConstructJob()
5326 EnableVec ? options::OPT_O_Group : options::OPT_fvectorize; in ConstructJob()
5327 if (Args.hasFlag(options::OPT_fvectorize, VectorizeAliasOption, in ConstructJob()
5328 options::OPT_fno_vectorize, EnableVec)) in ConstructJob()
5334 EnableSLPVec ? options::OPT_O_Group : options::OPT_fslp_vectorize; in ConstructJob()
5335 if (Args.hasFlag(options::OPT_fslp_vectorize, SLPVectAliasOption, in ConstructJob()
5336 options::OPT_fno_slp_vectorize, EnableSLPVec)) in ConstructJob()
5340 if (Args.hasFlag(options::OPT_fslp_vectorize_aggressive, in ConstructJob()
5341 options::OPT_fno_slp_vectorize_aggressive, false)) in ConstructJob()
5344 if (Arg *A = Args.getLastArg(options::OPT_fshow_overloads_EQ)) in ConstructJob()
5349 if (Arg *A = Args.getLastArg(options::OPT_fdollars_in_identifiers, in ConstructJob()
5350 options::OPT_fno_dollars_in_identifiers)) { in ConstructJob()
5351 if (A->getOption().matches(options::OPT_fdollars_in_identifiers)) in ConstructJob()
5359 if (Arg *A = Args.getLastArg(options::OPT_funit_at_a_time, in ConstructJob()
5360 options::OPT_fno_unit_at_a_time)) { in ConstructJob()
5361 if (A->getOption().matches(options::OPT_fno_unit_at_a_time)) in ConstructJob()
5365 if (Args.hasFlag(options::OPT_fapple_pragma_pack, in ConstructJob()
5366 options::OPT_fno_apple_pragma_pack, false)) in ConstructJob()
5383 if (!Args.hasArg(options::OPT_fbuiltin_strcat)) in ConstructJob()
5385 if (!Args.hasArg(options::OPT_fbuiltin_strcpy)) in ConstructJob()
5394 if (Args.hasFlag(options::OPT_frewrite_includes, in ConstructJob()
5395 options::OPT_fno_rewrite_includes, false) || in ConstructJob()
5400 if (Arg *A = Args.getLastArg(options::OPT_traditional, in ConstructJob()
5401 options::OPT_traditional_cpp)) { in ConstructJob()
5408 Args.AddLastArg(CmdArgs, options::OPT_dM); in ConstructJob()
5409 Args.AddLastArg(CmdArgs, options::OPT_dD); in ConstructJob()
5412 if (Arg *A = Args.getLastArg(options::OPT__serialize_diags)) { in ConstructJob()
5417 if (Args.hasArg(options::OPT_fretain_comments_from_system_headers)) in ConstructJob()
5421 Args.AddAllArgs(CmdArgs, options::OPT_fcomment_block_commands); in ConstructJob()
5423 Args.AddAllArgs(CmdArgs, options::OPT_fparse_all_comments); in ConstructJob()
5426 for (const Arg *A : Args.filtered(options::OPT_fplugin_EQ)) { in ConstructJob()
5434 Args.AddAllArgValues(CmdArgs, options::OPT_Xclang); in ConstructJob()
5435 for (const Arg *A : Args.filtered(options::OPT_mllvm)) { in ConstructJob()
5468 Args.AddAllArgs(CmdArgs, options::OPT_undef); in ConstructJob()
5512 if (Args.hasArg(options::OPT__SLASH_fallback) && in ConstructJob()
5529 if (Arg *A = Args.getLastArg(options::OPT_pg)) in ConstructJob()
5530 if (Args.hasArg(options::OPT_fomit_frame_pointer)) in ConstructJob()
5539 Args.ClaimAllArgs(options::OPT_fpch_preprocess); in ConstructJob()
5543 Args.ClaimAllArgs(options::OPT_clang_ignored_f_Group); in ConstructJob()
5544 Args.ClaimAllArgs(options::OPT_clang_ignored_m_Group); in ConstructJob()
5547 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
5558 args.getLastArg(options::OPT_fnext_runtime, options::OPT_fgnu_runtime, in AddObjCRuntimeArgs()
5559 options::OPT_fobjc_runtime_EQ); in AddObjCRuntimeArgs()
5564 runtimeArg->getOption().matches(options::OPT_fobjc_runtime_EQ)) { in AddObjCRuntimeArgs()
5583 if (Arg *abiArg = args.getLastArg(options::OPT_fobjc_abi_version_EQ)) { in AddObjCRuntimeArgs()
5599 if (args.hasFlag(options::OPT_fobjc_nonfragile_abi, in AddObjCRuntimeArgs()
5600 options::OPT_fno_objc_nonfragile_abi, in AddObjCRuntimeArgs()
5610 args.getLastArg(options::OPT_fobjc_nonfragile_abi_version_EQ)) { in AddObjCRuntimeArgs()
5648 } else if (runtimeArg->getOption().matches(options::OPT_fnext_runtime)) { in AddObjCRuntimeArgs()
5660 assert(runtimeArg->getOption().matches(options::OPT_fgnu_runtime)); in AddObjCRuntimeArgs()
5701 Args.getAllArgValues(options::OPT__SLASH_EH); in parseClangCLEHFlags()
5728 unsigned RTOptionID = options::OPT__SLASH_MT; in AddClangCLArgs()
5730 if (Args.hasArg(options::OPT__SLASH_LDd)) in AddClangCLArgs()
5733 RTOptionID = options::OPT__SLASH_MTd; in AddClangCLArgs()
5735 if (Arg *A = Args.getLastArg(options::OPT__SLASH_M_Group)) in AddClangCLArgs()
5740 case options::OPT__SLASH_MD: in AddClangCLArgs()
5741 if (Args.hasArg(options::OPT__SLASH_LDd)) in AddClangCLArgs()
5747 case options::OPT__SLASH_MDd: in AddClangCLArgs()
5753 case options::OPT__SLASH_MT: in AddClangCLArgs()
5754 if (Args.hasArg(options::OPT__SLASH_LDd)) in AddClangCLArgs()
5759 case options::OPT__SLASH_MTd: in AddClangCLArgs()
5768 if (Args.hasArg(options::OPT__SLASH_Zl)) { in AddClangCLArgs()
5781 if (!Args.hasArg(options::OPT_E) && !Args.hasArg(options::OPT__SLASH_EP)) in AddClangCLArgs()
5782 if (Arg *A = Args.getLastArg(options::OPT_show_includes)) in AddClangCLArgs()
5786 if (Args.hasFlag(options::OPT__SLASH_GR_, options::OPT__SLASH_GR, in AddClangCLArgs()
5791 *EmitCodeView = Args.hasArg(options::OPT__SLASH_Z7); in AddClangCLArgs()
5792 bool EmitDwarf = Args.hasArg(options::OPT_gdwarf); in AddClangCLArgs()
5809 if (Args.hasArg(options::OPT__SLASH_EP)) { in AddClangCLArgs()
5817 VolatileOptionID = options::OPT__SLASH_volatile_ms; in AddClangCLArgs()
5819 VolatileOptionID = options::OPT__SLASH_volatile_iso; in AddClangCLArgs()
5821 if (Arg *A = Args.getLastArg(options::OPT__SLASH_volatile_Group)) in AddClangCLArgs()
5824 if (VolatileOptionID == options::OPT__SLASH_volatile_ms) in AddClangCLArgs()
5827 Arg *MostGeneralArg = Args.getLastArg(options::OPT__SLASH_vmg); in AddClangCLArgs()
5828 Arg *BestCaseArg = Args.getLastArg(options::OPT__SLASH_vmb); in AddClangCLArgs()
5834 Arg *SingleArg = Args.getLastArg(options::OPT__SLASH_vms); in AddClangCLArgs()
5835 Arg *MultipleArg = Args.getLastArg(options::OPT__SLASH_vmm); in AddClangCLArgs()
5836 Arg *VirtualArg = Args.getLastArg(options::OPT__SLASH_vmv); in AddClangCLArgs()
5853 if (Arg *A = Args.getLastArg(options::OPT_vtordisp_mode_EQ)) in AddClangCLArgs()
5856 if (!Args.hasArg(options::OPT_fdiagnostics_format_EQ)) { in AddClangCLArgs()
5858 if (Args.hasArg(options::OPT__SLASH_fallback)) in AddClangCLArgs()
5896 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
5898 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
5932 (void)Args.hasArg(options::OPT_force__cpusubtype__ALL); in ConstructJob()
5935 Args.AddAllArgs(CmdArgs, options::OPT_I_Group); in ConstructJob()
5950 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
5951 if (Arg *A = Args.getLastArg(options::OPT_g_Group)) { in ConstructJob()
5952 WantDebug = !A->getOption().matches(options::OPT_g0) && in ConstructJob()
5953 !A->getOption().matches(options::OPT_ggdb0); in ConstructJob()
5973 Args.AddAllArgs(CmdArgs, options::OPT_I); in ConstructJob()
6030 for (const Arg *A : Args.filtered(options::OPT_W_Group)) in ConstructJob()
6036 Args.AddAllArgs(CmdArgs, options::OPT_mllvm); in ConstructJob()
6051 if (Args.hasArg(options::OPT_gsplit_dwarf) && in ConstructJob()
6070 A->getOption().matches(options::OPT_g_Group)) in ConstructJob()
6075 A->getOption().matches(options::OPT_W_Group)) in ConstructJob()
6126 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
6158 if (A.getOption().matches(options::OPT_Z_reserved_lib_stdcxx)) { in ConstructJob()
6254 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
6304 bool IsStatic = Args.hasArg(options::OPT_static); in constructHexagonLinkArgs()
6305 bool IsShared = Args.hasArg(options::OPT_shared); in constructHexagonLinkArgs()
6306 bool IsPIE = Args.hasArg(options::OPT_pie); in constructHexagonLinkArgs()
6307 bool IncStdLib = !Args.hasArg(options::OPT_nostdlib); in constructHexagonLinkArgs()
6308 bool IncStartFiles = !Args.hasArg(options::OPT_nostartfiles); in constructHexagonLinkArgs()
6309 bool IncDefLibs = !Args.hasArg(options::OPT_nodefaultlibs); in constructHexagonLinkArgs()
6316 Args.ClaimAllArgs(options::OPT_g_Group); in constructHexagonLinkArgs()
6317 Args.ClaimAllArgs(options::OPT_emit_llvm); in constructHexagonLinkArgs()
6318 Args.ClaimAllArgs(options::OPT_w); // Other warning options are already in constructHexagonLinkArgs()
6320 Args.ClaimAllArgs(options::OPT_static_libgcc); in constructHexagonLinkArgs()
6325 if (Args.hasArg(options::OPT_s)) in constructHexagonLinkArgs()
6328 if (Args.hasArg(options::OPT_r)) in constructHexagonLinkArgs()
6370 for (const Arg *A : Args.filtered(options::OPT_moslib_EQ)) { in constructHexagonLinkArgs()
6425 {options::OPT_T_Group, options::OPT_e, options::OPT_s, in constructHexagonLinkArgs()
6426 options::OPT_t, options::OPT_u_Group}); in constructHexagonLinkArgs()
6608 if (Args.hasArg(options::OPT_r)) in appendEBLinkFlags()
6641 Arg *A = Args.getLastArg(options::OPT_mabi_EQ); in hasMipsAbiArg()
6646 Arg *A = Args.getLastArg(options::OPT_m_libc_Group); in isUCLibc()
6647 return A && A->getOption().matches(options::OPT_muclibc); in isUCLibc()
6651 if (Arg *NaNArg = Args.getLastArg(options::OPT_mnan_EQ)) in isNaN2008()
6692 if (Arg *A = Args.getLastArg(options::OPT_msingle_float, in shouldUseFPXX()
6693 options::OPT_mdouble_float)) in shouldUseFPXX()
6694 if (A->getOption().matches(options::OPT_msingle_float)) in shouldUseFPXX()
6767 if (Arg *OutputOpt = Args.getLastArg(options::OPT_o)) { in getDependencyFileName()
6786 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
6788 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
6791 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
6808 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
6813 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
6816 {options::OPT_T_Group, options::OPT_e, options::OPT_s, in ConstructJob()
6817 options::OPT_t, options::OPT_Z_Flag, options::OPT_r}); in ConstructJob()
6824 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
6831 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) in ConstructJob()
6860 if (Args.hasArg(options::OPT_fno_integrated_as)) { in ConstructJob()
6869 if (Args.hasArg(options::OPT_gstabs)) in ConstructJob()
6871 else if (Args.hasArg(options::OPT_g_Group)) in ConstructJob()
6881 Args.hasArg(options::OPT_force__cpusubtype__ALL)) in ConstructJob()
6885 (((Args.hasArg(options::OPT_mkernel) || in ConstructJob()
6886 Args.hasArg(options::OPT_fapple_kext)) && in ConstructJob()
6888 Args.hasArg(options::OPT_static))) in ConstructJob()
6891 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
6939 if (Arg *A = Args.getLastArg(options::OPT_mlinker_version_EQ)) { in AddLinkArgs()
6949 if (Version[0] >= 100 && !Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) in AddLinkArgs()
6952 if (Args.hasArg(options::OPT_rdynamic) && Version[0] >= 137) in AddLinkArgs()
6957 if (Args.hasFlag(options::OPT_fapplication_extension, in AddLinkArgs()
6958 options::OPT_fno_application_extension, false)) in AddLinkArgs()
6992 Args.AddAllArgs(CmdArgs, options::OPT_static); in AddLinkArgs()
6993 if (!Args.hasArg(options::OPT_static)) in AddLinkArgs()
6995 if (Args.hasArg(options::OPT_fgnu_runtime)) { in AddLinkArgs()
7000 if (!Args.hasArg(options::OPT_dynamiclib)) { in AddLinkArgs()
7003 Args.AddLastArg(CmdArgs, options::OPT_force__cpusubtype__ALL); in AddLinkArgs()
7005 Args.AddLastArg(CmdArgs, options::OPT_bundle); in AddLinkArgs()
7006 Args.AddAllArgs(CmdArgs, options::OPT_bundle__loader); in AddLinkArgs()
7007 Args.AddAllArgs(CmdArgs, options::OPT_client__name); in AddLinkArgs()
7010 if ((A = Args.getLastArg(options::OPT_compatibility__version)) || in AddLinkArgs()
7011 (A = Args.getLastArg(options::OPT_current__version)) || in AddLinkArgs()
7012 (A = Args.getLastArg(options::OPT_install__name))) in AddLinkArgs()
7016 Args.AddLastArg(CmdArgs, options::OPT_force__flat__namespace); in AddLinkArgs()
7017 Args.AddLastArg(CmdArgs, options::OPT_keep__private__externs); in AddLinkArgs()
7018 Args.AddLastArg(CmdArgs, options::OPT_private__bundle); in AddLinkArgs()
7023 if ((A = Args.getLastArg(options::OPT_bundle)) || in AddLinkArgs()
7024 (A = Args.getLastArg(options::OPT_bundle__loader)) || in AddLinkArgs()
7025 (A = Args.getLastArg(options::OPT_client__name)) || in AddLinkArgs()
7026 (A = Args.getLastArg(options::OPT_force__flat__namespace)) || in AddLinkArgs()
7027 (A = Args.getLastArg(options::OPT_keep__private__externs)) || in AddLinkArgs()
7028 (A = Args.getLastArg(options::OPT_private__bundle))) in AddLinkArgs()
7032 Args.AddAllArgsTranslated(CmdArgs, options::OPT_compatibility__version, in AddLinkArgs()
7034 Args.AddAllArgsTranslated(CmdArgs, options::OPT_current__version, in AddLinkArgs()
7039 Args.AddAllArgsTranslated(CmdArgs, options::OPT_install__name, in AddLinkArgs()
7043 Args.AddLastArg(CmdArgs, options::OPT_all__load); in AddLinkArgs()
7044 Args.AddAllArgs(CmdArgs, options::OPT_allowable__client); in AddLinkArgs()
7045 Args.AddLastArg(CmdArgs, options::OPT_bind__at__load); in AddLinkArgs()
7047 Args.AddLastArg(CmdArgs, options::OPT_arch__errors__fatal); in AddLinkArgs()
7048 Args.AddLastArg(CmdArgs, options::OPT_dead__strip); in AddLinkArgs()
7049 Args.AddLastArg(CmdArgs, options::OPT_no__dead__strip__inits__and__terms); in AddLinkArgs()
7050 Args.AddAllArgs(CmdArgs, options::OPT_dylib__file); in AddLinkArgs()
7051 Args.AddLastArg(CmdArgs, options::OPT_dynamic); in AddLinkArgs()
7052 Args.AddAllArgs(CmdArgs, options::OPT_exported__symbols__list); in AddLinkArgs()
7053 Args.AddLastArg(CmdArgs, options::OPT_flat__namespace); in AddLinkArgs()
7054 Args.AddAllArgs(CmdArgs, options::OPT_force__load); in AddLinkArgs()
7055 Args.AddAllArgs(CmdArgs, options::OPT_headerpad__max__install__names); in AddLinkArgs()
7056 Args.AddAllArgs(CmdArgs, options::OPT_image__base); in AddLinkArgs()
7057 Args.AddAllArgs(CmdArgs, options::OPT_init); in AddLinkArgs()
7062 Args.AddLastArg(CmdArgs, options::OPT_nomultidefs); in AddLinkArgs()
7063 Args.AddLastArg(CmdArgs, options::OPT_multi__module); in AddLinkArgs()
7064 Args.AddLastArg(CmdArgs, options::OPT_single__module); in AddLinkArgs()
7065 Args.AddAllArgs(CmdArgs, options::OPT_multiply__defined); in AddLinkArgs()
7066 Args.AddAllArgs(CmdArgs, options::OPT_multiply__defined__unused); in AddLinkArgs()
7069 Args.getLastArg(options::OPT_fpie, options::OPT_fPIE, in AddLinkArgs()
7070 options::OPT_fno_pie, options::OPT_fno_PIE)) { in AddLinkArgs()
7071 if (A->getOption().matches(options::OPT_fpie) || in AddLinkArgs()
7072 A->getOption().matches(options::OPT_fPIE)) in AddLinkArgs()
7078 Args.AddLastArg(CmdArgs, options::OPT_prebind); in AddLinkArgs()
7079 Args.AddLastArg(CmdArgs, options::OPT_noprebind); in AddLinkArgs()
7080 Args.AddLastArg(CmdArgs, options::OPT_nofixprebinding); in AddLinkArgs()
7081 Args.AddLastArg(CmdArgs, options::OPT_prebind__all__twolevel__modules); in AddLinkArgs()
7082 Args.AddLastArg(CmdArgs, options::OPT_read__only__relocs); in AddLinkArgs()
7083 Args.AddAllArgs(CmdArgs, options::OPT_sectcreate); in AddLinkArgs()
7084 Args.AddAllArgs(CmdArgs, options::OPT_sectorder); in AddLinkArgs()
7085 Args.AddAllArgs(CmdArgs, options::OPT_seg1addr); in AddLinkArgs()
7086 Args.AddAllArgs(CmdArgs, options::OPT_segprot); in AddLinkArgs()
7087 Args.AddAllArgs(CmdArgs, options::OPT_segaddr); in AddLinkArgs()
7088 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__only__addr); in AddLinkArgs()
7089 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__write__addr); in AddLinkArgs()
7090 Args.AddAllArgs(CmdArgs, options::OPT_seg__addr__table); in AddLinkArgs()
7091 Args.AddAllArgs(CmdArgs, options::OPT_seg__addr__table__filename); in AddLinkArgs()
7092 Args.AddAllArgs(CmdArgs, options::OPT_sub__library); in AddLinkArgs()
7093 Args.AddAllArgs(CmdArgs, options::OPT_sub__umbrella); in AddLinkArgs()
7101 } else if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) { in AddLinkArgs()
7106 Args.AddLastArg(CmdArgs, options::OPT_twolevel__namespace); in AddLinkArgs()
7107 Args.AddLastArg(CmdArgs, options::OPT_twolevel__namespace__hints); in AddLinkArgs()
7108 Args.AddAllArgs(CmdArgs, options::OPT_umbrella); in AddLinkArgs()
7109 Args.AddAllArgs(CmdArgs, options::OPT_undefined); in AddLinkArgs()
7110 Args.AddAllArgs(CmdArgs, options::OPT_unexported__symbols__list); in AddLinkArgs()
7111 Args.AddAllArgs(CmdArgs, options::OPT_weak__reference__mismatches); in AddLinkArgs()
7112 Args.AddLastArg(CmdArgs, options::OPT_X_Flag); in AddLinkArgs()
7113 Args.AddAllArgs(CmdArgs, options::OPT_y); in AddLinkArgs()
7114 Args.AddLastArg(CmdArgs, options::OPT_w); in AddLinkArgs()
7115 Args.AddAllArgs(CmdArgs, options::OPT_pagezero__size); in AddLinkArgs()
7116 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__); in AddLinkArgs()
7117 Args.AddLastArg(CmdArgs, options::OPT_seglinkedit); in AddLinkArgs()
7118 Args.AddLastArg(CmdArgs, options::OPT_noseglinkedit); in AddLinkArgs()
7119 Args.AddAllArgs(CmdArgs, options::OPT_sectalign); in AddLinkArgs()
7120 Args.AddAllArgs(CmdArgs, options::OPT_sectobjectsymbols); in AddLinkArgs()
7121 Args.AddAllArgs(CmdArgs, options::OPT_segcreate); in AddLinkArgs()
7122 Args.AddLastArg(CmdArgs, options::OPT_whyload); in AddLinkArgs()
7123 Args.AddLastArg(CmdArgs, options::OPT_whatsloaded); in AddLinkArgs()
7124 Args.AddAllArgs(CmdArgs, options::OPT_dylinker__install__name); in AddLinkArgs()
7125 Args.AddLastArg(CmdArgs, options::OPT_dylinker); in AddLinkArgs()
7126 Args.AddLastArg(CmdArgs, options::OPT_Mach); in AddLinkArgs()
7148 if (Args.hasArg(options::OPT_ccc_arcmt_check, in ConstructJob()
7149 options::OPT_ccc_arcmt_migrate)) { in ConstructJob()
7165 Args.AddAllArgs(CmdArgs, {options::OPT_d_Flag, options::OPT_s, options::OPT_t, in ConstructJob()
7166 options::OPT_Z_Flag, options::OPT_u_Group, in ConstructJob()
7167 options::OPT_e, options::OPT_r}); in ConstructJob()
7172 if (Args.hasArg(options::OPT_ObjC) || Args.hasArg(options::OPT_ObjCXX)) in ConstructJob()
7178 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) in ConstructJob()
7190 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
7210 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) in ConstructJob()
7214 !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7230 if (Args.hasArg(options::OPT_fnested_functions)) in ConstructJob()
7235 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7245 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7249 Args.AddAllArgs(CmdArgs, options::OPT_T_Group); in ConstructJob()
7250 Args.AddAllArgs(CmdArgs, options::OPT_F); in ConstructJob()
7253 for (const Arg *A : Args.filtered(options::OPT_iframework)) in ConstructJob()
7256 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7257 if (Arg *A = Args.getLastArg(options::OPT_fveclib)) { in ConstructJob()
7345 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
7367 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_shared)) { in ConstructJob()
7372 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
7377 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
7393 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7394 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
7407 Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group, in ConstructJob()
7408 options::OPT_e, options::OPT_r}); in ConstructJob()
7412 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7417 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7423 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7494 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
7515 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
7517 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
7520 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
7527 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_shared)) { in ConstructJob()
7532 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
7535 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
7539 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
7547 if (Args.hasArg(options::OPT_nopie)) in ConstructJob()
7557 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7558 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7559 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7579 Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group, in ConstructJob()
7580 options::OPT_e, options::OPT_s, options::OPT_t, in ConstructJob()
7581 options::OPT_Z_Flag, options::OPT_r}); in ConstructJob()
7585 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7588 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7598 if (Args.hasArg(options::OPT_pthread)) { in ConstructJob()
7599 if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg)) in ConstructJob()
7605 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7606 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7615 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7616 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
7636 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
7656 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_shared)) { in ConstructJob()
7661 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
7664 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
7668 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
7683 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7684 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7685 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7700 {options::OPT_L, options::OPT_T_Group, options::OPT_e}); in ConstructJob()
7704 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7707 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7713 if (Args.hasArg(options::OPT_pthread)) { in ConstructJob()
7714 if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg)) in ConstructJob()
7720 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7721 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7744 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7745 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
7832 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
7854 !Args.hasArg(options::OPT_shared) && in ConstructJob()
7855 (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); in ConstructJob()
7859 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
7861 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
7864 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
7872 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
7875 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
7878 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
7912 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
7914 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
7915 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7928 if (Args.hasArg(options::OPT_static)) in ConstructJob()
7930 else if (Args.hasArg(options::OPT_shared) || IsPIE) in ConstructJob()
7938 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
7940 Args.AddAllArgs(CmdArgs, options::OPT_T_Group); in ConstructJob()
7941 Args.AddAllArgs(CmdArgs, options::OPT_e); in ConstructJob()
7942 Args.AddAllArgs(CmdArgs, options::OPT_s); in ConstructJob()
7943 Args.AddAllArgs(CmdArgs, options::OPT_t); in ConstructJob()
7944 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag); in ConstructJob()
7945 Args.AddAllArgs(CmdArgs, options::OPT_r); in ConstructJob()
7953 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
7957 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7966 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7970 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
7972 } else if (Args.hasArg(options::OPT_pg)) { in ConstructJob()
7980 if (Args.hasArg(options::OPT_pthread)) { in ConstructJob()
7981 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
7987 if (Args.hasArg(options::OPT_pg)) { in ConstructJob()
7988 if (Args.hasArg(options::OPT_shared)) in ConstructJob()
7998 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
8000 } else if (Args.hasArg(options::OPT_pg)) { in ConstructJob()
8009 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
8010 if (Args.hasArg(options::OPT_shared) || IsPIE) in ConstructJob()
8094 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
8118 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
8121 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
8123 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
8223 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
8224 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
8239 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
8240 Args.AddAllArgs(CmdArgs, options::OPT_T_Group); in ConstructJob()
8241 Args.AddAllArgs(CmdArgs, options::OPT_e); in ConstructJob()
8242 Args.AddAllArgs(CmdArgs, options::OPT_s); in ConstructJob()
8243 Args.AddAllArgs(CmdArgs, options::OPT_t); in ConstructJob()
8244 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag); in ConstructJob()
8245 Args.AddAllArgs(CmdArgs, options::OPT_r); in ConstructJob()
8271 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
8277 if (Args.hasArg(options::OPT_pthread)) in ConstructJob()
8282 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
8298 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
8299 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
8406 Args.AddLastArg(CmdArgs, options::OPT_march_EQ); in ConstructJob()
8412 if ((A = Args.getLastArg(options::OPT_mcpu_EQ)) && in ConstructJob()
8416 Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ); in ConstructJob()
8417 Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ); in ConstructJob()
8450 if (Arg *A = Args.getLastArg(options::OPT_mnan_EQ)) { in ConstructJob()
8456 if (Arg *A = Args.getLastArg(options::OPT_mfp32, options::OPT_mfpxx, in ConstructJob()
8457 options::OPT_mfp64)) { in ConstructJob()
8468 Args.getLastArg(options::OPT_mips16, options::OPT_mno_mips16)) { in ConstructJob()
8469 if (A->getOption().matches(options::OPT_mips16)) { in ConstructJob()
8478 Args.AddLastArg(CmdArgs, options::OPT_mmicromips, in ConstructJob()
8479 options::OPT_mno_micromips); in ConstructJob()
8480 Args.AddLastArg(CmdArgs, options::OPT_mdsp, options::OPT_mno_dsp); in ConstructJob()
8481 Args.AddLastArg(CmdArgs, options::OPT_mdspr2, options::OPT_mno_dspr2); in ConstructJob()
8483 if (Arg *A = Args.getLastArg(options::OPT_mmsa, options::OPT_mno_msa)) { in ConstructJob()
8486 if (A->getOption().matches(options::OPT_mmsa)) in ConstructJob()
8490 Args.AddLastArg(CmdArgs, options::OPT_mhard_float, in ConstructJob()
8491 options::OPT_msoft_float); in ConstructJob()
8493 Args.AddLastArg(CmdArgs, options::OPT_mdouble_float, in ConstructJob()
8494 options::OPT_msingle_float); in ConstructJob()
8496 Args.AddLastArg(CmdArgs, options::OPT_modd_spreg, in ConstructJob()
8497 options::OPT_mno_odd_spreg); in ConstructJob()
8511 Args.AddAllArgs(CmdArgs, options::OPT_I); in ConstructJob()
8512 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
8526 if (Args.hasArg(options::OPT_gsplit_dwarf) && in ConstructJob()
8536 bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) || in AddLibgcc()
8537 Args.hasArg(options::OPT_static); in AddLibgcc()
8554 else if (!Args.hasArg(options::OPT_shared) && D.CCCIsCXX()) in AddLibgcc()
8717 !Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) && in ConstructJob()
8718 (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); in ConstructJob()
8726 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
8728 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
8731 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
8747 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
8750 if (Args.hasArg(options::OPT_s)) in ConstructJob()
8759 if (!Args.hasArg(options::OPT_static)) { in ConstructJob()
8766 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
8772 } else if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
8778 (!Args.hasArg(options::OPT_static) && in ConstructJob()
8779 !Args.hasArg(options::OPT_shared))) { in ConstructJob()
8788 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
8791 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
8792 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
8806 if (Args.hasArg(options::OPT_static)) in ConstructJob()
8808 else if (Args.hasArg(options::OPT_shared)) in ConstructJob()
8822 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
8823 Args.AddAllArgs(CmdArgs, options::OPT_u); in ConstructJob()
8830 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) in ConstructJob()
8839 !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
8840 bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) && in ConstructJob()
8841 !Args.hasArg(options::OPT_static); in ConstructJob()
8850 Args.ClaimAllArgs(options::OPT_stdlib_EQ); in ConstructJob()
8852 if (!Args.hasArg(options::OPT_nostdlib)) { in ConstructJob()
8853 if (!Args.hasArg(options::OPT_nodefaultlibs)) { in ConstructJob()
8854 if (Args.hasArg(options::OPT_static)) in ConstructJob()
8860 bool WantPthread = Args.hasArg(options::OPT_pthread) || in ConstructJob()
8861 Args.hasArg(options::OPT_pthreads); in ConstructJob()
8863 if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, in ConstructJob()
8864 options::OPT_fno_openmp, false)) { in ConstructJob()
8897 if (Args.hasArg(options::OPT_static)) in ConstructJob()
8903 if (!Args.hasArg(options::OPT_nostartfiles)) { in ConstructJob()
8905 if (Args.hasArg(options::OPT_shared)) in ConstructJob()
8957 !Args.hasArg(options::OPT_dynamic) && !Args.hasArg(options::OPT_shared); in ConstructJob()
8962 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
8964 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
8967 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
8972 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
8975 if (Args.hasArg(options::OPT_s)) in ConstructJob()
9000 else if (Args.hasArg(options::OPT_shared)) in ConstructJob()
9005 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9006 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
9013 else if (Args.hasArg(options::OPT_shared)) in ConstructJob()
9020 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
9021 Args.AddAllArgs(CmdArgs, options::OPT_u); in ConstructJob()
9025 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) in ConstructJob()
9031 !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
9033 Args.hasArg(options::OPT_static_libstdcxx) && !IsStatic; in ConstructJob()
9042 if (!Args.hasArg(options::OPT_nostdlib)) { in ConstructJob()
9043 if (!Args.hasArg(options::OPT_nodefaultlibs)) { in ConstructJob()
9049 if (Args.hasArg(options::OPT_pthread) || in ConstructJob()
9050 Args.hasArg(options::OPT_pthreads) || D.CCCIsCXX()) { in ConstructJob()
9078 if (!Args.hasArg(options::OPT_nostartfiles)) { in ConstructJob()
9080 if (Args.hasArg(options::OPT_shared)) in ConstructJob()
9102 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
9129 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9138 {options::OPT_L, options::OPT_T_Group, options::OPT_e}); in ConstructJob()
9144 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
9151 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9152 if (Args.hasArg(options::OPT_pthread)) in ConstructJob()
9182 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
9207 if (Args.hasArg(options::OPT_static)) { in ConstructJob()
9210 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
9212 if (Args.hasArg(options::OPT_shared)) in ConstructJob()
9235 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9236 if (!Args.hasArg(options::OPT_shared)) { in ConstructJob()
9237 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
9241 if (Args.hasArg(options::OPT_pie)) in ConstructJob()
9250 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) in ConstructJob()
9259 {options::OPT_L, options::OPT_T_Group, options::OPT_e}); in ConstructJob()
9263 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
9271 if (!Args.hasArg(options::OPT_static)) { in ConstructJob()
9286 if (Args.hasArg(options::OPT_pthread)) in ConstructJob()
9289 if (!Args.hasArg(options::OPT_nolibc)) { in ConstructJob()
9294 if (Args.hasArg(options::OPT_static) || in ConstructJob()
9295 Args.hasArg(options::OPT_static_libgcc)) { in ConstructJob()
9299 if (Args.hasArg(options::OPT_shared_libgcc)) { in ConstructJob()
9301 if (!Args.hasArg(options::OPT_shared)) in ConstructJob()
9311 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
9319 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9320 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) in ConstructJob()
9368 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles) && in ConstructJob()
9414 if (Args.hasArg(options::OPT_g_Group, options::OPT__SLASH_Z7)) in ConstructJob()
9417 bool DLL = Args.hasArg(options::OPT__SLASH_LD, options::OPT__SLASH_LDd, in ConstructJob()
9418 options::OPT_shared); in ConstructJob()
9430 if (Args.hasArg(options::OPT__SLASH_MD, options::OPT__SLASH_MDd)) { in ConstructJob()
9444 Args.AddAllArgValues(CmdArgs, options::OPT__SLASH_link); in ConstructJob()
9446 if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, in ConstructJob()
9447 options::OPT_fno_openmp, false)) { in ConstructJob()
9477 if (A.getOption().matches(options::OPT_l)) { in ConstructJob()
9497 StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "link"); in ConstructJob()
9538 Args.AddAllArgs(CmdArgs, {options::OPT_D, options::OPT_U, options::OPT_I}); in GetCommand()
9541 if (Arg *A = Args.getLastArg(options::OPT_fbuiltin, options::OPT_fno_builtin)) in GetCommand()
9542 CmdArgs.push_back(A->getOption().getID() == options::OPT_fbuiltin ? "/Oi" in GetCommand()
9544 if (Arg *A = Args.getLastArg(options::OPT_O, options::OPT_O0)) { in GetCommand()
9545 if (A->getOption().getID() == options::OPT_O0) { in GetCommand()
9559 if (Arg *A = Args.getLastArg(options::OPT_fomit_frame_pointer, in GetCommand()
9560 options::OPT_fno_omit_frame_pointer)) in GetCommand()
9561 CmdArgs.push_back(A->getOption().getID() == options::OPT_fomit_frame_pointer in GetCommand()
9564 if (!Args.hasArg(options::OPT_fwritable_strings)) in GetCommand()
9570 if (Args.hasFlag(options::OPT__SLASH_GR_, options::OPT__SLASH_GR, in GetCommand()
9573 if (Arg *A = Args.getLastArg(options::OPT_ffunction_sections, in GetCommand()
9574 options::OPT_fno_function_sections)) in GetCommand()
9575 CmdArgs.push_back(A->getOption().getID() == options::OPT_ffunction_sections in GetCommand()
9578 if (Arg *A = Args.getLastArg(options::OPT_fdata_sections, in GetCommand()
9579 options::OPT_fno_data_sections)) in GetCommand()
9581 A->getOption().getID() == options::OPT_fdata_sections ? "/Gw" : "/Gw-"); in GetCommand()
9582 if (Args.hasArg(options::OPT_fsyntax_only)) in GetCommand()
9584 if (Args.hasArg(options::OPT_g_Flag, options::OPT_gline_tables_only, in GetCommand()
9585 options::OPT__SLASH_Z7)) in GetCommand()
9589 Args.getAllArgValues(options::OPT_include); in GetCommand()
9594 Args.AddAllArgs(CmdArgs, options::OPT__SLASH_LD); in GetCommand()
9595 Args.AddAllArgs(CmdArgs, options::OPT__SLASH_LDd); in GetCommand()
9596 Args.AddAllArgs(CmdArgs, options::OPT__SLASH_EH); in GetCommand()
9597 Args.AddAllArgs(CmdArgs, options::OPT__SLASH_Zl); in GetCommand()
9600 if (Arg *A = Args.getLastArg(options::OPT__SLASH_MD, options::OPT__SLASH_MDd, in GetCommand()
9601 options::OPT__SLASH_MT, options::OPT__SLASH_MTd)) in GetCommand()
9642 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
9653 if (Args.hasArg(options::OPT_gsplit_dwarf)) in ConstructJob()
9660 if (Args.hasArg(options::OPT_mthreads)) in AddLibGCC()
9667 bool Static = Args.hasArg(options::OPT_static_libgcc) || in AddLibGCC()
9668 Args.hasArg(options::OPT_static); in AddLibGCC()
9669 bool Shared = Args.hasArg(options::OPT_shared); in AddLibGCC()
9700 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
9702 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
9705 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
9707 StringRef LinkerName = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "ld"); in ConstructJob()
9718 if (Args.hasArg(options::OPT_s)) in ConstructJob()
9729 if (Args.hasArg(options::OPT_mwindows)) { in ConstructJob()
9732 } else if (Args.hasArg(options::OPT_mconsole)) { in ConstructJob()
9737 if (Args.hasArg(options::OPT_static)) in ConstructJob()
9740 if (Args.hasArg(options::OPT_mdll)) in ConstructJob()
9742 else if (Args.hasArg(options::OPT_shared)) in ConstructJob()
9745 if (Args.hasArg(options::OPT_mdll) || Args.hasArg(options::OPT_shared)) { in ConstructJob()
9758 Args.AddAllArgs(CmdArgs, options::OPT_e); in ConstructJob()
9760 Args.AddLastArg(CmdArgs, options::OPT_r); in ConstructJob()
9761 Args.AddLastArg(CmdArgs, options::OPT_s); in ConstructJob()
9762 Args.AddLastArg(CmdArgs, options::OPT_t); in ConstructJob()
9763 Args.AddAllArgs(CmdArgs, options::OPT_u_Group); in ConstructJob()
9764 Args.AddLastArg(CmdArgs, options::OPT_Z_Flag); in ConstructJob()
9766 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
9767 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_mdll)) { in ConstructJob()
9770 if (Args.hasArg(options::OPT_municode)) in ConstructJob()
9775 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
9780 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
9789 !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructJob()
9790 bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) && in ConstructJob()
9791 !Args.hasArg(options::OPT_static); in ConstructJob()
9799 if (!Args.hasArg(options::OPT_nostdlib)) { in ConstructJob()
9800 if (!Args.hasArg(options::OPT_nodefaultlibs)) { in ConstructJob()
9801 if (Args.hasArg(options::OPT_static)) in ConstructJob()
9804 if (Args.hasArg(options::OPT_fstack_protector) || in ConstructJob()
9805 Args.hasArg(options::OPT_fstack_protector_strong) || in ConstructJob()
9806 Args.hasArg(options::OPT_fstack_protector_all)) { in ConstructJob()
9810 if (Args.hasArg(options::OPT_fopenmp)) in ConstructJob()
9815 if (Args.hasArg(options::OPT_pg)) in ConstructJob()
9818 if (Args.hasArg(options::OPT_pthread)) in ConstructJob()
9822 if (Args.hasArg(options::OPT_mwindows)) { in ConstructJob()
9831 if (Args.hasArg(options::OPT_static)) in ConstructJob()
9837 if (!Args.hasArg(options::OPT_nostartfiles)) { in ConstructJob()
9864 if (Args.hasArg(options::OPT_v)) in ConstructJob()
9867 if (Arg *A = Args.getLastArg(options::OPT_g_Group)) in ConstructJob()
9868 if (!A->getOption().matches(options::OPT_g0)) in ConstructJob()
9871 if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm, in ConstructJob()
9875 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
9898 if (Args.hasArg(options::OPT_v)) in ConstructJob()
9902 if (Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions, in ConstructJob()
9937 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
9965 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
9967 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructJob()
9969 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
9975 if (Args.hasArg(options::OPT_pie)) in ConstructJob()
9977 if (Args.hasArg(options::OPT_rdynamic)) in ConstructJob()
9979 if (Args.hasArg(options::OPT_s)) in ConstructJob()
10000 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
10024 CmdArgs.push_back(Args.hasArg(options::OPT_static) ? "-Bstatic" in ConstructJob()
10027 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
10041 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_rdynamic)) { in ConstructJob()
10049 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructJob()
10054 Args.hasArg(options::OPT_shared) ? "crtbeginS.obj" : "crtbegin.obj"; in ConstructJob()
10058 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructJob()
10062 if (D.CCCIsCXX() && !Args.hasArg(options::OPT_nostdlib) && in ConstructJob()
10063 !Args.hasArg(options::OPT_nodefaultlibs)) { in ConstructJob()
10064 bool StaticCXX = Args.hasArg(options::OPT_static_libstdcxx) && in ConstructJob()
10065 !Args.hasArg(options::OPT_static); in ConstructJob()
10073 if (!Args.hasArg(options::OPT_nostdlib)) { in ConstructJob()
10074 if (!Args.hasArg(options::OPT_nodefaultlibs)) { in ConstructJob()
10083 if (Args.hasArg(options::OPT_shared)) { in ConstructJob()
10127 Args.AddAllArgs(CmdArgs, {options::OPT_I_Group, options::OPT_clang_i_Group, in ConstructJob()
10128 options::OPT_std_EQ, options::OPT_D, options::OPT_U, in ConstructJob()
10129 options::OPT_f_Group, options::OPT_f_clang_Group, in ConstructJob()
10130 options::OPT_g_Group, options::OPT_M_Group, in ConstructJob()
10131 options::OPT_O_Group, options::OPT_W_Group}); in ConstructJob()
10138 if (Args.getLastArg(options::OPT_MF) && !Args.getLastArg(options::OPT_MT) && in ConstructJob()
10141 Arg *A = Args.getLastArg(options::OPT_o); in ConstructJob()
10174 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
10175 for (const Arg *A : Args.filtered(options::OPT_I, options::OPT_isystem)) { in ConstructJob()
10201 !Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles); in ConstructJob()
10203 !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs); in ConstructJob()
10215 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructJob()
10216 Args.ClaimAllArgs(options::OPT_w); in ConstructJob()
10217 Args.ClaimAllArgs(options::OPT_static_libgcc); in ConstructJob()
10219 if (Args.hasArg(options::OPT_s)) // Pass the 'strip' option. in ConstructJob()
10232 Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group, in ConstructJob()
10233 options::OPT_e, options::OPT_s, options::OPT_t, in ConstructJob()
10234 options::OPT_Z_Flag, options::OPT_r}); in ConstructJob()
10274 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler); in ConstructJob()
10310 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructPS4LinkJob()
10312 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructPS4LinkJob()
10315 Args.ClaimAllArgs(options::OPT_w); in ConstructPS4LinkJob()
10320 if (Args.hasArg(options::OPT_pie)) in ConstructPS4LinkJob()
10323 if (Args.hasArg(options::OPT_rdynamic)) in ConstructPS4LinkJob()
10325 if (Args.hasArg(options::OPT_shared)) in ConstructPS4LinkJob()
10337 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructPS4LinkJob()
10338 Args.AddAllArgs(CmdArgs, options::OPT_T_Group); in ConstructPS4LinkJob()
10339 Args.AddAllArgs(CmdArgs, options::OPT_e); in ConstructPS4LinkJob()
10340 Args.AddAllArgs(CmdArgs, options::OPT_s); in ConstructPS4LinkJob()
10341 Args.AddAllArgs(CmdArgs, options::OPT_t); in ConstructPS4LinkJob()
10342 Args.AddAllArgs(CmdArgs, options::OPT_r); in ConstructPS4LinkJob()
10344 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) in ConstructPS4LinkJob()
10349 if (Args.hasArg(options::OPT_pthread)) { in ConstructPS4LinkJob()
10369 Args.ClaimAllArgs(options::OPT_g_Group); in ConstructGoldLinkJob()
10371 Args.ClaimAllArgs(options::OPT_emit_llvm); in ConstructGoldLinkJob()
10374 Args.ClaimAllArgs(options::OPT_w); in ConstructGoldLinkJob()
10379 if (Args.hasArg(options::OPT_pie)) in ConstructGoldLinkJob()
10382 if (Args.hasArg(options::OPT_static)) { in ConstructGoldLinkJob()
10385 if (Args.hasArg(options::OPT_rdynamic)) in ConstructGoldLinkJob()
10388 if (Args.hasArg(options::OPT_shared)) { in ConstructGoldLinkJob()
10406 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructGoldLinkJob()
10408 if (!Args.hasArg(options::OPT_shared)) { in ConstructGoldLinkJob()
10409 if (Args.hasArg(options::OPT_pg)) in ConstructGoldLinkJob()
10411 else if (Args.hasArg(options::OPT_pie)) in ConstructGoldLinkJob()
10422 if (Args.hasArg(options::OPT_static)) in ConstructGoldLinkJob()
10424 else if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) in ConstructGoldLinkJob()
10432 Args.AddAllArgs(CmdArgs, options::OPT_L); in ConstructGoldLinkJob()
10434 Args.AddAllArgs(CmdArgs, options::OPT_T_Group); in ConstructGoldLinkJob()
10435 Args.AddAllArgs(CmdArgs, options::OPT_e); in ConstructGoldLinkJob()
10436 Args.AddAllArgs(CmdArgs, options::OPT_s); in ConstructGoldLinkJob()
10437 Args.AddAllArgs(CmdArgs, options::OPT_t); in ConstructGoldLinkJob()
10438 Args.AddAllArgs(CmdArgs, options::OPT_r); in ConstructGoldLinkJob()
10440 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) in ConstructGoldLinkJob()
10445 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { in ConstructGoldLinkJob()
10451 if (Args.hasArg(options::OPT_pg)) in ConstructGoldLinkJob()
10458 if (Args.hasArg(options::OPT_pg)) in ConstructGoldLinkJob()
10462 if (Args.hasArg(options::OPT_static)) { in ConstructGoldLinkJob()
10464 } else if (Args.hasArg(options::OPT_pg)) { in ConstructGoldLinkJob()
10472 if (Args.hasArg(options::OPT_pthread)) { in ConstructGoldLinkJob()
10473 if (Args.hasArg(options::OPT_pg)) in ConstructGoldLinkJob()
10479 if (Args.hasArg(options::OPT_pg)) { in ConstructGoldLinkJob()
10480 if (Args.hasArg(options::OPT_shared)) in ConstructGoldLinkJob()
10483 if (Args.hasArg(options::OPT_static)) { in ConstructGoldLinkJob()
10494 if (Args.hasArg(options::OPT_static)) { in ConstructGoldLinkJob()
10505 if (Args.hasArg(options::OPT_static)) { in ConstructGoldLinkJob()
10507 } else if (Args.hasArg(options::OPT_pg)) { in ConstructGoldLinkJob()
10516 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { in ConstructGoldLinkJob()
10517 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) in ConstructGoldLinkJob()
10544 if (const Arg *A = Args.getLastArg(options::OPT_fuse_ld_EQ)) { in ConstructJob()
10555 PS4Linker = !Args.hasArg(options::OPT_shared); in ConstructJob()