reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Frontend/CompilerInvocation.cpp
  684   Opts.OptimizationLevel = OptimizationLevel;
  688   Opts.setInlining((Opts.OptimizationLevel == 0)
  688   Opts.setInlining((Opts.OptimizationLevel == 0)
  696     if (Opts.OptimizationLevel > 0) {
  699         Opts.setInlining(CodeGenOptions::NormalInlining);
  701         Opts.setInlining(CodeGenOptions::OnlyHintInlining);
  703         Opts.setInlining(CodeGenOptions::OnlyAlwaysInlining);
  707   Opts.ExperimentalNewPassManager = Args.hasFlag(
  711   Opts.DebugPassManager =
  718       Opts.setVecLib(CodeGenOptions::Accelerate);
  720       Opts.setVecLib(CodeGenOptions::MASSV);
  722       Opts.setVecLib(CodeGenOptions::SVML);
  724       Opts.setVecLib(CodeGenOptions::NoLibrary);
  741       Opts.setDebugInfo(static_cast<codegenoptions::DebugInfoKind>(Val));
  753       Opts.setDebuggerTuning(static_cast<llvm::DebuggerKind>(Val));
  755   Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
  756   Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info);
  757   Opts.EmitCodeView = Args.hasArg(OPT_gcodeview);
  758   Opts.CodeViewGHash = Args.hasArg(OPT_gcodeview_ghash);
  759   Opts.MacroDebugInfo = Args.hasArg(OPT_debug_info_macro);
  760   Opts.WholeProgramVTables = Args.hasArg(OPT_fwhole_program_vtables);
  761   Opts.VirtualFunctionElimination =
  763   Opts.LTOVisibilityPublicStd = Args.hasArg(OPT_flto_visibility_public_std);
  764   Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
  765   Opts.SplitDwarfOutput = Args.getLastArgValue(OPT_split_dwarf_output);
  766   Opts.SplitDwarfInlining = !Args.hasArg(OPT_fno_split_dwarf_inlining);
  767   Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs);
  768   Opts.DebugExplicitImport = Args.hasArg(OPT_dwarf_explicit_import);
  769   Opts.DebugFwdTemplateParams = Args.hasArg(OPT_debug_forward_template_params);
  770   Opts.EmbedSource = Args.hasArg(OPT_gembed_source);
  773     Opts.DebugPrefixMap.insert(StringRef(Arg).split('='));
  777     Opts.EmitLLVMUseLists = A->getOption().getID() == OPT_emit_llvm_uselists;
  779   Opts.DisableLLVMPasses = Args.hasArg(OPT_disable_llvm_passes);
  780   Opts.DisableLifetimeMarkers = Args.hasArg(OPT_disable_lifetimemarkers);
  787   if (Opts.OptimizationLevel > 0 &&
  788       Opts.getDebugInfo() >= codegenoptions::LimitedDebugInfo &&
  790     Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values);
  792   Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);
  793   Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
  794   Opts.IndirectTlsSegRefs = Args.hasArg(OPT_mno_tls_direct_seg_refs);
  795   Opts.ForbidGuardVariables = Args.hasArg(OPT_fforbid_guard_variables);
  796   Opts.UseRegisterSizedBitfieldAccess = Args.hasArg(
  798   Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
  799   Opts.StructPathTBAA = !Args.hasArg(OPT_no_struct_path_tbaa);
  800   Opts.NewStructPathTBAA = !Args.hasArg(OPT_no_struct_path_tbaa) &&
  802   Opts.FineGrainedBitfieldAccesses =
  805   Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
  806   Opts.RecordCommandLine = Args.getLastArgValue(OPT_record_command_line);
  807   Opts.MergeAllConstants = Args.hasArg(OPT_fmerge_all_constants);
  808   Opts.NoCommon = Args.hasArg(OPT_fno_common);
  809   Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_float);
  810   Opts.OptimizeSize = getOptimizationLevelSize(Args);
  811   Opts.SimplifyLibCalls = !(Args.hasArg(OPT_fno_builtin) ||
  813   if (Opts.SimplifyLibCalls)
  814     getAllNoBuiltinFuncValues(Args, Opts.NoBuiltinFuncs);
  815   Opts.UnrollLoops =
  817                    (Opts.OptimizationLevel > 1));
  818   Opts.RerollLoops = Args.hasArg(OPT_freroll_loops);
  820   Opts.DisableIntegratedAS = Args.hasArg(OPT_fno_integrated_as);
  821   Opts.Autolink = !Args.hasArg(OPT_fno_autolink);
  822   Opts.SampleProfileFile = Args.getLastArgValue(OPT_fprofile_sample_use_EQ);
  823   Opts.DebugInfoForProfiling = Args.hasFlag(
  825   Opts.DebugNameTable = static_cast<unsigned>(
  831   Opts.DebugRangesBaseAddress = Args.hasArg(OPT_fdebug_ranges_base_address);
  833   setPGOInstrumentor(Opts, Args, Diags);
  834   Opts.InstrProfileOutput =
  836   Opts.ProfileInstrumentUsePath =
  838   if (!Opts.ProfileInstrumentUsePath.empty())
  839     setPGOUseInstrumentor(Opts, Opts.ProfileInstrumentUsePath);
  839     setPGOUseInstrumentor(Opts, Opts.ProfileInstrumentUsePath);
  840   Opts.ProfileRemappingFile =
  842   if (!Opts.ProfileRemappingFile.empty() && !Opts.ExperimentalNewPassManager) {
  842   if (!Opts.ProfileRemappingFile.empty() && !Opts.ExperimentalNewPassManager) {
  848   Opts.CoverageMapping =
  850   Opts.DumpCoverageMapping = Args.hasArg(OPT_dump_coverage_mapping);
  851   Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
  852   Opts.PreserveAsmComments = !Args.hasArg(OPT_fno_preserve_as_comments);
  853   Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
  854   Opts.ObjCAutoRefCountExceptions = Args.hasArg(OPT_fobjc_arc_exceptions);
  855   Opts.CXAAtExit = !Args.hasArg(OPT_fno_use_cxa_atexit);
  856   Opts.RegisterGlobalDtorsWithAtExit =
  858   Opts.CXXCtorDtorAliases = Args.hasArg(OPT_mconstructor_aliases);
  859   Opts.CodeModel = TargetOpts.CodeModel;
  860   Opts.DebugPass = Args.getLastArgValue(OPT_mdebug_pass);
  879       Opts.setFramePointer(FP);
  885     Opts.setFramePointer(CodeGenOptions::FramePointerKind::All);
  887   Opts.DisableFree = Args.hasArg(OPT_disable_free);
  888   Opts.DiscardValueNames = Args.hasArg(OPT_discard_value_names);
  889   Opts.DisableTailCalls = Args.hasArg(OPT_mdisable_tail_calls);
  890   Opts.NoEscapingBlockTailCalls =
  892   Opts.FloatABI = Args.getLastArgValue(OPT_mfloat_abi);
  893   Opts.LessPreciseFPMAD = Args.hasArg(OPT_cl_mad_enable) ||
  896   Opts.LimitFloatPrecision = Args.getLastArgValue(OPT_mlimit_float_precision);
  897   Opts.NoInfsFPMath = (Args.hasArg(OPT_menable_no_infinities) ||
  900   Opts.NoNaNsFPMath = (Args.hasArg(OPT_menable_no_nans) ||
  904   Opts.NoSignedZeros = (Args.hasArg(OPT_fno_signed_zeros) ||
  908   Opts.Reassociate = Args.hasArg(OPT_mreassociate);
  909   Opts.FlushDenorm = Args.hasArg(OPT_cl_denorms_are_zero) ||
  912   Opts.CorrectlyRoundedDivSqrt =
  914   Opts.UniformWGSize =
  916   Opts.Reciprocals = Args.getAllArgValues(OPT_mrecip_EQ);
  917   Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math);
  918   Opts.NoTrappingMath = Args.hasArg(OPT_fno_trapping_math);
  919   Opts.StrictFloatCastOverflow =
  922   Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
  923   Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, Diags);
  924   Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
  925   Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings);
  926   Opts.NoWarn = Args.hasArg(OPT_massembler_no_warn);
  927   Opts.EnableSegmentedStacks = Args.hasArg(OPT_split_stacks);
  928   Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
  929   Opts.IncrementalLinkerCompatible =
  931   Opts.PIECopyRelocations =
  933   Opts.NoPLT = Args.hasArg(OPT_fno_plt);
  934   Opts.SaveTempLabels = Args.hasArg(OPT_msave_temp_labels);
  935   Opts.NoDwarfDirectoryAsm = Args.hasArg(OPT_fno_dwarf_directory_asm);
  936   Opts.SoftFloat = Args.hasArg(OPT_msoft_float);
  937   Opts.StrictEnums = Args.hasArg(OPT_fstrict_enums);
  938   Opts.StrictReturn = !Args.hasArg(OPT_fno_strict_return);
  939   Opts.StrictVTablePointers = Args.hasArg(OPT_fstrict_vtable_pointers);
  940   Opts.ForceEmitVTables = Args.hasArg(OPT_fforce_emit_vtables);
  941   Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
  944   Opts.UnwindTables = Args.hasArg(OPT_munwind_tables);
  945   Opts.RelocationModel = getRelocModel(Args, Diags);
  946   Opts.ThreadModel = Args.getLastArgValue(OPT_mthread_model, "posix");
  947   if (Opts.ThreadModel != "posix" && Opts.ThreadModel != "single")
  947   if (Opts.ThreadModel != "posix" && Opts.ThreadModel != "single")
  950         << Opts.ThreadModel;
  951   Opts.TrapFuncName = Args.getLastArgValue(OPT_ftrap_function_EQ);
  952   Opts.UseInitArray = Args.hasArg(OPT_fuse_init_array);
  954   Opts.FunctionSections = Args.hasFlag(OPT_ffunction_sections,
  956   Opts.DataSections = Args.hasFlag(OPT_fdata_sections,
  958   Opts.StackSizeSection =
  960   Opts.UniqueSectionNames = Args.hasFlag(OPT_funique_section_names,
  963   Opts.MergeFunctions = Args.hasArg(OPT_fmerge_functions);
  965   Opts.NoUseJumpTables = Args.hasArg(OPT_fno_jump_tables);
  967   Opts.NullPointerIsValid = Args.hasArg(OPT_fno_delete_null_pointer_checks);
  969   Opts.ProfileSampleAccurate = Args.hasArg(OPT_fprofile_sample_accurate);
  971   Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ);
  972   Opts.PrepareForThinLTO = false;
  976       Opts.PrepareForThinLTO = true;
  980   Opts.LTOUnit = Args.hasFlag(OPT_flto_unit, OPT_fno_lto_unit, false);
  981   Opts.EnableSplitLTOUnit = Args.hasArg(OPT_fsplit_lto_unit);
  986     Opts.ThinLTOIndexFile = Args.getLastArgValue(OPT_fthinlto_index_EQ);
  989     Opts.SaveTempsFilePrefix =
  994   Opts.ThinLinkBitcodeFile = Args.getLastArgValue(OPT_fthin_link_bitcode_EQ);
  996   Opts.MSVolatile = Args.hasArg(OPT_fms_volatile);
  998   Opts.VectorizeLoop = Args.hasArg(OPT_vectorize_loops);
  999   Opts.VectorizeSLP = Args.hasArg(OPT_vectorize_slp);
 1001   Opts.PreferVectorWidth = Args.getLastArgValue(OPT_mprefer_vector_width_EQ);
 1003   Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name);
 1004   Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
 1006   Opts.ControlFlowGuardNoChecks = Args.hasArg(OPT_cfguard_no_checks);
 1007   Opts.ControlFlowGuard = Args.hasArg(OPT_cfguard);
 1009   Opts.DisableGCov = Args.hasArg(OPT_test_coverage);
 1010   Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data);
 1011   Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes);
 1012   if (Opts.EmitGcovArcs || Opts.EmitGcovNotes) {
 1012   if (Opts.EmitGcovArcs || Opts.EmitGcovNotes) {
 1013     Opts.CoverageDataFile = Args.getLastArgValue(OPT_coverage_data_file);
 1014     Opts.CoverageNotesFile = Args.getLastArgValue(OPT_coverage_notes_file);
 1015     Opts.CoverageExtraChecksum = Args.hasArg(OPT_coverage_cfg_checksum);
 1016     Opts.CoverageNoFunctionNamesInData =
 1018     Opts.ProfileFilterFiles =
 1020     Opts.ProfileExcludeFiles =
 1022     Opts.CoverageExitBlockBeforeBody =
 1031         memcpy(Opts.CoverageVersion, CoverageVersion.data(), 4);
 1048       Opts.setEmbedBitcode(
 1054   if (Opts.getEmbedBitcode() == CodeGenOptions::Embed_All) {
 1068         Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
 1068         Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
 1070         Opts.CmdArgs.push_back('\0');
 1075   Opts.PreserveVec3Type = Args.hasArg(OPT_fpreserve_vec3_type);
 1076   Opts.InstrumentFunctions = Args.hasArg(OPT_finstrument_functions);
 1077   Opts.InstrumentFunctionsAfterInlining =
 1079   Opts.InstrumentFunctionEntryBare =
 1082   Opts.XRayInstrumentFunctions =
 1084   Opts.XRayAlwaysEmitCustomEvents =
 1086   Opts.XRayAlwaysEmitTypedEvents =
 1088   Opts.XRayInstructionThreshold =
 1094     Opts.XRayInstrumentationBundle.Mask = XRayInstrKind::All;
 1098                                      Diags, Opts.XRayInstrumentationBundle);
 1100   Opts.InstrumentForProfiling = Args.hasArg(OPT_pg);
 1101   Opts.CallFEntry = Args.hasArg(OPT_mfentry);
 1102   Opts.EmitOpenCLArgMetadata = Args.hasArg(OPT_cl_kernel_arg_info);
 1107       Opts.CFProtectionReturn = 1;
 1108       Opts.CFProtectionBranch = 1;
 1110       Opts.CFProtectionReturn = 1;
 1112       Opts.CFProtectionBranch = 1;
 1123       Opts.setCompressDebugSections(llvm::DebugCompressionType::GNU);
 1130       Opts.setCompressDebugSections(DCT);
 1134   Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
 1135   Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);
 1147     Opts.LinkBitcodeFiles.push_back(F);
 1149   Opts.SanitizeCoverageType =
 1151   Opts.SanitizeCoverageIndirectCalls =
 1153   Opts.SanitizeCoverageTraceBB = Args.hasArg(OPT_fsanitize_coverage_trace_bb);
 1154   Opts.SanitizeCoverageTraceCmp = Args.hasArg(OPT_fsanitize_coverage_trace_cmp);
 1155   Opts.SanitizeCoverageTraceDiv = Args.hasArg(OPT_fsanitize_coverage_trace_div);
 1156   Opts.SanitizeCoverageTraceGep = Args.hasArg(OPT_fsanitize_coverage_trace_gep);
 1157   Opts.SanitizeCoverage8bitCounters =
 1159   Opts.SanitizeCoverageTracePC = Args.hasArg(OPT_fsanitize_coverage_trace_pc);
 1160   Opts.SanitizeCoverageTracePCGuard =
 1162   Opts.SanitizeCoverageNoPrune = Args.hasArg(OPT_fsanitize_coverage_no_prune);
 1163   Opts.SanitizeCoverageInline8bitCounters =
 1165   Opts.SanitizeCoveragePCTable = Args.hasArg(OPT_fsanitize_coverage_pc_table);
 1166   Opts.SanitizeCoverageStackDepth =
 1168   Opts.SanitizeMemoryTrackOrigins =
 1170   Opts.SanitizeMemoryUseAfterDtor =
 1174   Opts.SanitizeMinimalRuntime = Args.hasArg(OPT_fsanitize_minimal_runtime);
 1175   Opts.SanitizeCfiCrossDso = Args.hasArg(OPT_fsanitize_cfi_cross_dso);
 1176   Opts.SanitizeCfiICallGeneralizePointers =
 1178   Opts.SanitizeCfiCanonicalJumpTables =
 1180   Opts.SanitizeStats = Args.hasArg(OPT_fsanitize_stats);
 1184     Opts.SanitizeAddressPoisonCustomArrayCookie =
 1190     Opts.SanitizeAddressUseAfterScope =
 1193   Opts.SanitizeAddressGlobalsDeadStripping =
 1197     Opts.SanitizeAddressUseOdrIndicator =
 1200   Opts.SSPBufferSize =
 1202   Opts.StackRealignment = Args.hasArg(OPT_mstackrealign);
 1205     unsigned StackAlignment = Opts.StackAlignment;
 1207     Opts.StackAlignment = StackAlignment;
 1212     unsigned StackProbeSize = Opts.StackProbeSize;
 1214     Opts.StackProbeSize = StackProbeSize;
 1217   Opts.NoStackArgProbe = Args.hasArg(OPT_mno_stack_arg_probe);
 1230       Opts.setObjCDispatchMethod(
 1237     Opts.ObjCConvertMessagesToRuntimeCalls = 0;
 1241     Opts.ExplicitEmulatedTLS = true;
 1242     Opts.EmulatedTLS =
 1258       Opts.setDefaultTLSModel(static_cast<CodeGenOptions::TLSModel>(Model));
 1265       Opts.FPDenormalMode = "ieee";
 1267       Opts.FPDenormalMode = "preserve-sign";
 1269       Opts.FPDenormalMode = "positive-zero";
 1276       Opts.setStructReturnConvention(CodeGenOptions::SRCK_OnStack);
 1279       Opts.setStructReturnConvention(CodeGenOptions::SRCK_InRegs);
 1283   Opts.DependentLibraries = Args.getAllArgValues(OPT_dependent_lib);
 1284   Opts.LinkerOptions = Args.getAllArgValues(OPT_linker_option);
 1287   Opts.OptRecordFile = Args.getLastArgValue(OPT_opt_record_file);
 1288   if (!Opts.OptRecordFile.empty())
 1292     Opts.OptRecordPasses = A->getValue();
 1297     Opts.OptRecordFormat = A->getValue();
 1302     Opts.OptimizationRemarkPattern =
 1308     Opts.OptimizationRemarkMissedPattern =
 1314     Opts.OptimizationRemarkAnalysisPattern =
 1319   Opts.DiagnosticsWithHotness =
 1321   bool UsingSampleProfile = !Opts.SampleProfileFile.empty();
 1323       (Opts.getProfileUse() != CodeGenOptions::ProfileNone);
 1325   if (Opts.DiagnosticsWithHotness && !UsingProfile &&
 1331   Opts.DiagnosticsHotnessThreshold = getLastArgUInt64Value(
 1333   if (Opts.DiagnosticsHotnessThreshold > 0 && !UsingProfile)
 1345   if (NeedLocTracking && Opts.getDebugInfo() == codegenoptions::NoDebugInfo)
 1346     Opts.setDebugInfo(codegenoptions::LocTrackingOnly);
 1348   Opts.RewriteMapFiles = Args.getAllArgValues(OPT_frewrite_map_file);
 1354                       Opts.SanitizeRecover);
 1357                       Opts.SanitizeTrap);
 1359   Opts.CudaGpuBinaryFileName =
 1362   Opts.Backchain = Args.hasArg(OPT_mbackchain);
 1364   Opts.EmitCheckPathComponentsToStrip = getLastArgIntValue(
 1367   Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true);
 1369   Opts.Addrsig = Args.hasArg(OPT_faddrsig);
 1375       Opts.setSignReturnAddress(CodeGenOptions::SignReturnAddressScope::None);
 1377       Opts.setSignReturnAddress(CodeGenOptions::SignReturnAddressScope::All);
 1379       Opts.setSignReturnAddress(
 1389           Opts.setSignReturnAddressKey(
 1392           Opts.setSignReturnAddressKey(
 1401   Opts.BranchTargetEnforcement = Args.hasArg(OPT_mbranch_target_enforce);
 1403   Opts.KeepStaticConsts = Args.hasArg(OPT_fkeep_static_consts);
 1405   Opts.SpeculativeLoadHardening = Args.hasArg(OPT_mspeculative_load_hardening);
 1407   Opts.DefaultFunctionAttrs = Args.getAllArgValues(OPT_default_function_attr);
 1409   Opts.PassPlugins = Args.getAllArgValues(OPT_fpass_plugin_EQ);
 1411   Opts.SymbolPartition = Args.getLastArgValue(OPT_fsymbol_partition_EQ);