reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
2462 Opts.DllExportInlines = false; 2467 Opts.CFProtectionBranch = 1; 2490 Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header); 2491 Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins); 2494 CompilerInvocation::setLangDefaults(Opts, IK, T, PPOpts, LangStd); 2500 && Opts.OpenCLVersion > 100) { 2502 << Opts.getOpenCLVersionTuple().getAsString() 2511 Opts.GNUKeywords = Args.hasFlag(OPT_fgnu_keywords, OPT_fno_gnu_keywords, 2512 Opts.GNUKeywords); 2514 Opts.Digraphs = Args.hasFlag(OPT_fdigraphs, OPT_fno_digraphs, Opts.Digraphs); 2514 Opts.Digraphs = Args.hasFlag(OPT_fdigraphs, OPT_fno_digraphs, Opts.Digraphs); 2517 Opts.CXXOperatorNames = 0; 2520 Opts.CUDAIsDevice = 1; 2523 Opts.CUDAAllowVariadicFunctions = 1; 2526 Opts.CUDAHostDeviceConstexpr = 0; 2528 if (Opts.CUDAIsDevice && Args.hasArg(OPT_fcuda_approx_transcendentals)) 2529 Opts.CUDADeviceApproxTranscendentals = 1; 2531 Opts.GPURelocatableDeviceCode = Args.hasArg(OPT_fgpu_rdc); 2533 if (Opts.HIP) 2534 Opts.GPUAllowDeviceInit = 1; 2539 Opts.HIPUseNewLaunchAPI = Args.hasArg(OPT_fhip_new_launch_api); 2541 if (Opts.ObjC) { 2544 if (Opts.ObjCRuntime.tryParse(value)) 2549 Opts.setGC(LangOptions::GCOnly); 2551 Opts.setGC(LangOptions::HybridGC); 2553 Opts.ObjCAutoRefCount = 1; 2554 if (!Opts.ObjCRuntime.allowsARC()) 2563 Opts.ObjCWeakRuntime = 1; 2565 Opts.ObjCWeakRuntime = Opts.ObjCRuntime.allowsWeak(); 2565 Opts.ObjCWeakRuntime = Opts.ObjCRuntime.allowsWeak(); 2571 assert(!Opts.ObjCWeak); 2572 } else if (Opts.getGC() != LangOptions::NonGC) { 2574 } else if (!Opts.ObjCWeakRuntime) { 2577 Opts.ObjCWeak = 1; 2579 } else if (Opts.ObjCAutoRefCount) { 2580 Opts.ObjCWeak = Opts.ObjCWeakRuntime; 2580 Opts.ObjCWeak = Opts.ObjCWeakRuntime; 2584 Opts.ObjCInferRelatedResultType = 0; 2587 Opts.ObjCSubscriptingLegacyRuntime = 2588 (Opts.ObjCRuntime.getKind() == ObjCRuntime::FragileMacOSX); 2603 Opts.GNUCVersion = Major * 100 * 100 + Minor * 100 + Patch; 2607 if (Opts.CPlusPlus) 2611 Opts.GNUInline = 1; 2615 if (!Opts.CPlusPlus) 2618 Opts.AppleKext = 1; 2622 Opts.ObjCGCBitmapPrint = 1; 2625 Opts.NoConstantCFStrings = 1; 2627 Opts.CFRuntime = 2638 Opts.ZVector = 1; 2641 Opts.POSIXThreads = 1; 2645 Opts.setValueVisibilityMode(parseVisibility(visOpt, Args, Diags)); 2647 Opts.setValueVisibilityMode(DefaultVisibility); 2652 Opts.setTypeVisibilityMode(parseVisibility(typeVisOpt, Args, Diags)); 2654 Opts.setTypeVisibilityMode(Opts.getValueVisibilityMode()); 2654 Opts.setTypeVisibilityMode(Opts.getValueVisibilityMode()); 2658 Opts.InlineVisibilityHidden = 1; 2661 Opts.GlobalAllocationFunctionVisibilityHidden = 1; 2664 Opts.SetVisibilityForExternDecls = 1; 2667 Opts.setSignedOverflowBehavior(LangOptions::SOB_Trapping); 2669 Opts.OverflowHandler = 2673 Opts.setSignedOverflowBehavior(LangOptions::SOB_Defined); 2675 Opts.MSVCCompat = Args.hasArg(OPT_fms_compatibility); 2676 Opts.MicrosoftExt = Opts.MSVCCompat || Args.hasArg(OPT_fms_extensions); 2676 Opts.MicrosoftExt = Opts.MSVCCompat || Args.hasArg(OPT_fms_extensions); 2677 Opts.AsmBlocks = Args.hasArg(OPT_fasm_blocks) || Opts.MicrosoftExt; 2677 Opts.AsmBlocks = Args.hasArg(OPT_fasm_blocks) || Opts.MicrosoftExt; 2678 Opts.MSCompatibilityVersion = 0; 2684 Opts.MSCompatibilityVersion = VT.getMajor() * 10000000 + 2692 Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17; 2692 Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17; 2692 Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17; 2692 Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus17; 2693 Opts.Trigraphs = 2694 Args.hasFlag(OPT_ftrigraphs, OPT_fno_trigraphs, Opts.Trigraphs); 2696 Opts.DollarIdents = Args.hasFlag(OPT_fdollars_in_identifiers, 2698 Opts.DollarIdents); 2699 Opts.PascalStrings = Args.hasArg(OPT_fpascal_strings); 2700 Opts.VtorDispMode = getLastArgIntValue(Args, OPT_vtordisp_mode_EQ, 1, Diags); 2701 Opts.Borland = Args.hasArg(OPT_fborland_extensions); 2702 Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings); 2703 Opts.ConstStrings = Args.hasFlag(OPT_fconst_strings, OPT_fno_const_strings, 2704 Opts.ConstStrings); 2712 Opts.setLaxVectorConversions(*Kind); 2718 Opts.ThreadsafeStatics = 0; 2719 Opts.Exceptions = Args.hasArg(OPT_fexceptions); 2720 Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions); 2721 Opts.CXXExceptions = Args.hasArg(OPT_fcxx_exceptions); 2724 Opts.FixedPoint = 2726 !Opts.CPlusPlus; 2727 Opts.PaddingOnUnsignedFixedPoint = 2731 Opts.FixedPoint; 2744 Opts.SjLjExceptions = Opt.matches(options::OPT_fsjlj_exceptions); 2745 Opts.SEHExceptions = Opt.matches(options::OPT_fseh_exceptions); 2746 Opts.DWARFExceptions = Opt.matches(options::OPT_fdwarf_exceptions); 2747 Opts.WasmExceptions = Opt.matches(options::OPT_fwasm_exceptions); 2750 Opts.ExternCNoUnwind = Args.hasArg(OPT_fexternc_nounwind); 2751 Opts.TraditionalCPP = Args.hasArg(OPT_traditional_cpp); 2753 Opts.RTTI = Opts.CPlusPlus && !Args.hasArg(OPT_fno_rtti); 2753 Opts.RTTI = Opts.CPlusPlus && !Args.hasArg(OPT_fno_rtti); 2754 Opts.RTTIData = Opts.RTTI && !Args.hasArg(OPT_fno_rtti_data); 2754 Opts.RTTIData = Opts.RTTI && !Args.hasArg(OPT_fno_rtti_data); 2755 Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL 2755 Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL 2756 && Opts.OpenCLVersion == 200); 2757 Opts.BlocksRuntimeOptional = Args.hasArg(OPT_fblocks_runtime_optional); 2758 Opts.Coroutines = Opts.CPlusPlus2a || Args.hasArg(OPT_fcoroutines_ts); 2758 Opts.Coroutines = Opts.CPlusPlus2a || Args.hasArg(OPT_fcoroutines_ts); 2760 Opts.DoubleSquareBracketAttributes = 2763 Opts.DoubleSquareBracketAttributes); 2765 Opts.CPlusPlusModules = Opts.CPlusPlus2a; 2765 Opts.CPlusPlusModules = Opts.CPlusPlus2a; 2766 Opts.ModulesTS = Args.hasArg(OPT_fmodules_ts); 2767 Opts.Modules = 2768 Args.hasArg(OPT_fmodules) || Opts.ModulesTS || Opts.CPlusPlusModules; 2768 Args.hasArg(OPT_fmodules) || Opts.ModulesTS || Opts.CPlusPlusModules; 2769 Opts.ModulesStrictDeclUse = Args.hasArg(OPT_fmodules_strict_decluse); 2770 Opts.ModulesDeclUse = 2771 Args.hasArg(OPT_fmodules_decluse) || Opts.ModulesStrictDeclUse; 2774 Opts.ModulesLocalVisibility = 2775 Args.hasArg(OPT_fmodules_local_submodule_visibility) || Opts.ModulesTS || 2776 Opts.CPlusPlusModules; 2777 Opts.ModulesCodegen = Args.hasArg(OPT_fmodules_codegen); 2778 Opts.ModulesDebugInfo = Args.hasArg(OPT_fmodules_debuginfo); 2779 Opts.ModulesSearchAll = Opts.Modules && 2779 Opts.ModulesSearchAll = Opts.Modules && 2782 Opts.ModulesErrorRecovery = !Args.hasArg(OPT_fno_modules_error_recovery); 2783 Opts.ImplicitModules = !Args.hasArg(OPT_fno_implicit_modules); 2784 Opts.CharIsSigned = Opts.OpenCL || !Args.hasArg(OPT_fno_signed_char); 2784 Opts.CharIsSigned = Opts.OpenCL || !Args.hasArg(OPT_fno_signed_char); 2785 Opts.WChar = Opts.CPlusPlus && !Args.hasArg(OPT_fno_wchar); 2785 Opts.WChar = Opts.CPlusPlus && !Args.hasArg(OPT_fno_wchar); 2786 Opts.Char8 = Args.hasFlag(OPT_fchar8__t, OPT_fno_char8__t, Opts.CPlusPlus2a); 2786 Opts.Char8 = Args.hasFlag(OPT_fchar8__t, OPT_fno_char8__t, Opts.CPlusPlus2a); 2788 Opts.WCharSize = llvm::StringSwitch<unsigned>(A->getValue()) 2793 if (Opts.WCharSize == 0) 2796 Opts.WCharIsSigned = Args.hasFlag(OPT_fsigned_wchar, OPT_fno_signed_wchar, true); 2797 Opts.ShortEnums = Args.hasArg(OPT_fshort_enums); 2798 Opts.Freestanding = Args.hasArg(OPT_ffreestanding); 2799 Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding; 2799 Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding; 2800 if (!Opts.NoBuiltin) 2801 getAllNoBuiltinFuncValues(Args, Opts.NoBuiltinFuncs); 2802 Opts.NoMathBuiltin = Args.hasArg(OPT_fno_math_builtin); 2803 Opts.RelaxedTemplateTemplateArgs = 2805 Opts.SizedDeallocation = Args.hasArg(OPT_fsized_deallocation); 2806 Opts.AlignedAllocation = 2808 Opts.AlignedAllocation); 2809 Opts.AlignedAllocationUnavailable = 2810 Opts.AlignedAllocation && Args.hasArg(OPT_aligned_alloc_unavailable); 2811 Opts.NewAlignOverride = 2813 if (Opts.NewAlignOverride && !llvm::isPowerOf2_32(Opts.NewAlignOverride)) { 2813 if (Opts.NewAlignOverride && !llvm::isPowerOf2_32(Opts.NewAlignOverride)) { 2817 Opts.NewAlignOverride = 0; 2819 Opts.ConceptsTS = Args.hasArg(OPT_fconcepts_ts); 2820 Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); 2821 Opts.AccessControl = !Args.hasArg(OPT_fno_access_control); 2822 Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); 2823 Opts.MathErrno = !Opts.OpenCL && Args.hasArg(OPT_fmath_errno); 2823 Opts.MathErrno = !Opts.OpenCL && Args.hasArg(OPT_fmath_errno); 2824 Opts.InstantiationDepth = 2826 Opts.ArrowDepth = 2828 Opts.ConstexprCallDepth = 2830 Opts.ConstexprStepLimit = 2832 Opts.EnableNewConstInterp = 2834 Opts.ForceNewConstInterp = 2836 Opts.BracketDepth = getLastArgIntValue(Args, OPT_fbracket_depth, 256, Diags); 2837 Opts.DelayedTemplateParsing = Args.hasArg(OPT_fdelayed_template_parsing); 2838 Opts.NumLargeByValueCopy = 2840 Opts.MSBitfields = Args.hasArg(OPT_mms_bitfields); 2841 Opts.ObjCConstantStringClass = 2843 Opts.ObjCDefaultSynthProperties = 2845 Opts.EncodeExtendedBlockSig = 2847 Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls); 2848 Opts.PackStruct = getLastArgIntValue(Args, OPT_fpack_struct_EQ, 0, Diags); 2849 Opts.MaxTypeAlign = getLastArgIntValue(Args, OPT_fmax_type_align_EQ, 0, Diags); 2850 Opts.AlignDouble = Args.hasArg(OPT_malign_double); 2851 Opts.LongDoubleSize = Args.hasArg(OPT_mlong_double_128) 2854 Opts.PPCIEEELongDouble = Args.hasArg(OPT_mabi_EQ_ieeelongdouble); 2855 Opts.PICLevel = getLastArgIntValue(Args, OPT_pic_level, 0, Diags); 2856 Opts.ROPI = Args.hasArg(OPT_fropi); 2857 Opts.RWPI = Args.hasArg(OPT_frwpi); 2858 Opts.PIE = Args.hasArg(OPT_pic_is_pie); 2859 Opts.Static = Args.hasArg(OPT_static_define); 2860 Opts.DumpRecordLayoutsSimple = Args.hasArg(OPT_fdump_record_layouts_simple); 2861 Opts.DumpRecordLayouts = Opts.DumpRecordLayoutsSimple 2861 Opts.DumpRecordLayouts = Opts.DumpRecordLayoutsSimple 2863 Opts.DumpVTableLayouts = Args.hasArg(OPT_fdump_vtable_layouts); 2864 Opts.SpellChecking = !Args.hasArg(OPT_fno_spell_checking); 2865 Opts.NoBitFieldTypeAlign = Args.hasArg(OPT_fno_bitfield_type_align); 2866 Opts.SinglePrecisionConstants = Args.hasArg(OPT_cl_single_precision_constant); 2867 Opts.FastRelaxedMath = Args.hasArg(OPT_cl_fast_relaxed_math); 2868 Opts.HexagonQdsp6Compat = Args.hasArg(OPT_mqdsp6_compat); 2869 Opts.FakeAddressSpaceMap = Args.hasArg(OPT_ffake_address_space_map); 2870 Opts.ParseUnknownAnytype = Args.hasArg(OPT_funknown_anytype); 2871 Opts.DebuggerSupport = Args.hasArg(OPT_fdebugger_support); 2872 Opts.DebuggerCastResultToId = Args.hasArg(OPT_fdebugger_cast_result_to_id); 2873 Opts.DebuggerObjCLiteral = Args.hasArg(OPT_fdebugger_objc_literal); 2874 Opts.ApplePragmaPack = Args.hasArg(OPT_fapple_pragma_pack); 2875 Opts.ModuleName = Args.getLastArgValue(OPT_fmodule_name_EQ); 2876 Opts.CurrentModule = Opts.ModuleName; 2876 Opts.CurrentModule = Opts.ModuleName; 2877 Opts.AppExt = Args.hasArg(OPT_fapplication_extension); 2878 Opts.ModuleFeatures = Args.getAllArgValues(OPT_fmodule_feature); 2879 llvm::sort(Opts.ModuleFeatures); 2880 Opts.NativeHalfType |= Args.hasArg(OPT_fnative_half_type); 2881 Opts.NativeHalfArgsAndReturns |= Args.hasArg(OPT_fnative_half_arguments_and_returns); 2884 Opts.HalfArgsAndReturns = Args.hasArg(OPT_fallow_half_arguments_and_returns) 2885 | Opts.NativeHalfArgsAndReturns; 2886 Opts.GNUAsm = !Args.hasArg(OPT_fno_gnu_inline_asm); 2887 Opts.Cmse = Args.hasArg(OPT_mcmse); // Armv8-M Security Extensions 2897 Opts.DeclSpecKeyword = 2899 (Opts.MicrosoftExt || Opts.Borland || Opts.CUDA)); 2899 (Opts.MicrosoftExt || Opts.Borland || Opts.CUDA)); 2899 (Opts.MicrosoftExt || Opts.Borland || Opts.CUDA)); 2912 Opts.setAddressSpaceMapMangling(LangOptions::ASMM_Target); 2915 Opts.setAddressSpaceMapMangling(LangOptions::ASMM_On); 2918 Opts.setAddressSpaceMapMangling(LangOptions::ASMM_Off); 2938 Opts.setMSPointerToMemberRepresentationMethod(InheritanceModel); 2967 Opts.setDefaultCallingConv(DefaultCC); 2972 if (Opts.getDefaultCallingConv() != LangOptions::DCC_None) 2981 Opts.setDefaultCallingConv(LangOptions::DCC_StdCall); 2986 Opts.OpenMP = Args.hasArg(options::OPT_fopenmp) ? 45 : 0; 2991 Opts.OpenMPSimd = !Opts.OpenMP && IsSimdSpecified; 2991 Opts.OpenMPSimd = !Opts.OpenMP && IsSimdSpecified; 2992 Opts.OpenMPUseTLS = 2993 Opts.OpenMP && !Args.hasArg(options::OPT_fnoopenmp_use_tls); 2994 Opts.OpenMPIsDevice = 2995 Opts.OpenMP && Args.hasArg(options::OPT_fopenmp_is_device); 2997 Opts.OpenMPIsDevice || Args.hasArg(options::OPT_fopenmp_targets_EQ); 2999 if (Opts.OpenMP || Opts.OpenMPSimd) { 2999 if (Opts.OpenMP || Opts.OpenMPSimd) { 3002 (IsSimdSpecified || IsTargetSpecified) ? 45 : Opts.OpenMP, Diags)) 3003 Opts.OpenMP = Version; 3005 Opts.OpenMP = 45; 3008 if (!Opts.OpenMPIsDevice) { 3024 if ((Opts.OpenMPIsDevice && T.isNVPTX()) || Opts.OpenCLCPlusPlus) { 3024 if ((Opts.OpenMPIsDevice && T.isNVPTX()) || Opts.OpenCLCPlusPlus) { 3025 Opts.Exceptions = 0; 3026 Opts.CXXExceptions = 0; 3028 if (Opts.OpenMPIsDevice && T.isNVPTX()) { 3029 Opts.OpenMPCUDANumSMs = 3031 Opts.OpenMPCUDANumSMs, Diags); 3032 Opts.OpenMPCUDABlocksPerSM = 3034 Opts.OpenMPCUDABlocksPerSM, Diags); 3035 Opts.OpenMPCUDAReductionBufNum = getLastArgIntValue( 3037 Opts.OpenMPCUDAReductionBufNum, Diags); 3042 Opts.OpenMPOptimisticCollapse = 3061 Opts.OMPTargetTriples.push_back(TT); 3068 Opts.OMPHostIRFile = A->getValue(); 3069 if (!llvm::sys::fs::exists(Opts.OMPHostIRFile)) 3071 << Opts.OMPHostIRFile; 3074 Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device); 3077 Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() && 3077 Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() && 3081 Opts.OpenMPCUDAForceFullRuntime = 3082 Opts.OpenMPIsDevice && T.isNVPTX() && 3086 Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro, 3088 Opts.Deprecated); 3093 Opts.Optimize = Opt != 0; 3094 Opts.OptimizeSize = OptSize != 0; 3099 Opts.NoInlineDefine = !Opts.Optimize; 3099 Opts.NoInlineDefine = !Opts.Optimize; 3104 Opts.NoInlineDefine = true; 3106 Opts.FastMath = Args.hasArg(OPT_ffast_math) || 3108 Opts.FiniteMathOnly = Args.hasArg(OPT_ffinite_math_only) || 3111 Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) || 3118 Opts.setDefaultFPContractMode(LangOptions::FPC_Fast); 3120 Opts.setDefaultFPContractMode(LangOptions::FPC_On); 3122 Opts.setDefaultFPContractMode(LangOptions::FPC_Off); 3127 Opts.RetainCommentsFromSystemHeaders = 3136 case 0: Opts.setStackProtector(LangOptions::SSPOff); break; 3137 case 1: Opts.setStackProtector(LangOptions::SSPOn); break; 3138 case 2: Opts.setStackProtector(LangOptions::SSPStrong); break; 3139 case 3: Opts.setStackProtector(LangOptions::SSPReq); break; 3145 Opts.setTrivialAutoVarInit( 3148 Opts.setTrivialAutoVarInit(LangOptions::TrivialAutoVarInitKind::Zero); 3150 Opts.setTrivialAutoVarInit(LangOptions::TrivialAutoVarInitKind::Pattern); 3157 Diags, Opts.Sanitize); 3159 Opts.SanitizeAddressFieldPadding = 3161 Opts.SanitizerBlacklistFiles = Args.getAllArgValues(OPT_fsanitize_blacklist); 3164 Opts.XRayInstrument = 3168 Opts.XRayAlwaysEmitCustomEvents = 3173 Opts.XRayAlwaysEmitTypedEvents = 3178 Opts.XRayAlwaysInstrumentFiles = 3180 Opts.XRayNeverInstrumentFiles = 3182 Opts.XRayAttrListFiles = Args.getAllArgValues(OPT_fxray_attr_list); 3185 Opts.ForceEmitVTables = Args.hasArg(OPT_fforce_emit_vtables); 3188 Opts.AllowEditorPlaceholders = Args.hasArg(OPT_fallow_editor_placeholders); 3190 Opts.RegisterStaticDestructors = !Args.hasArg(OPT_fno_cxx_static_destructors); 3193 Opts.setClangABICompat(LangOptions::ClangABI::Latest); 3210 Opts.setClangABICompat(LangOptions::ClangABI::Ver3_8); 3212 Opts.setClangABICompat(LangOptions::ClangABI::Ver4); 3214 Opts.setClangABICompat(LangOptions::ClangABI::Ver6); 3216 Opts.setClangABICompat(LangOptions::ClangABI::Ver7); 3218 Opts.setClangABICompat(LangOptions::ClangABI::Ver9); 3225 Opts.CompleteMemberPointers = Args.hasArg(OPT_fcomplete_member_pointers); 3226 Opts.BuildingPCHWithObjectFile = Args.hasArg(OPT_building_pch_with_obj);