Lines Matching refs:TC
328 const ToolChain &TC, bool KernelOrKext, in addExceptionArgs() argument
331 const llvm::Triple &Triple = TC.getTriple(); in addExceptionArgs()
403 static bool ShouldEnableAutolink(const ArgList &Args, const ToolChain &TC, in ShouldEnableAutolink() argument
406 if (TC.getTriple().isOSDarwin()) { in ShouldEnableAutolink()
409 Default = TC.useIntegratedAs(); in ShouldEnableAutolink()
472 static void addDebugPrefixMapArg(const Driver &D, const ToolChain &TC, in addDebugPrefixMapArg() argument
486 std::string GlobalRemapEntry = TC.GetGlobalDebugPathRemapping(); in addDebugPrefixMapArg()
586 static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, in addPGOAndCoverageFlags() argument
590 const Driver &D = TC.getDriver(); in addPGOAndCoverageFlags()
629 if (TC.getTriple().isOSAIX()) { in addPGOAndCoverageFlags()
632 << ProfileSampleUseArg->getSpelling() << TC.getTriple().str(); in addPGOAndCoverageFlags()
642 if (TC.getTriple().isWindowsMSVCEnvironment() && in addPGOAndCoverageFlags()
647 "--dependent-lib=" + TC.getCompilerRTBasename(Args, "profile"))); in addPGOAndCoverageFlags()
663 if (TC.getTriple().isWindowsMSVCEnvironment() && in addPGOAndCoverageFlags()
668 "--dependent-lib=" + TC.getCompilerRTBasename(Args, "profile"))); in addPGOAndCoverageFlags()
700 bool EmitCovData = TC.needsGCovInstrumentation(Args); in addPGOAndCoverageFlags()
868 const Driver &D, const ToolChain &TC) { in checkDebugInfoOption() argument
870 if (TC.supportsDebugInfoOption(A)) in checkDebugInfoOption()
873 << A->getAsString(Args) << TC.getTripleString(); in checkDebugInfoOption()
880 const ToolChain &TC) { in RenderDebugInfoCompressionArgs() argument
884 if (checkDebugInfoOption(A, Args, D, TC)) { in RenderDebugInfoCompressionArgs()
1246 [&Args, &CmdArgs, HasStdlibxxIsystem](const ToolChain &TC) { in AddPreprocessingOptions() argument
1247 HasStdlibxxIsystem ? TC.AddClangCXXStdlibIsystemArgs(Args, CmdArgs) in AddPreprocessingOptions()
1248 : TC.AddClangCXXStdlibIncludeArgs(Args, CmdArgs); in AddPreprocessingOptions()
1284 [&Args, &CmdArgs](const ToolChain &TC) { in AddPreprocessingOptions() argument
1285 TC.AddClangSystemIncludeArgs(Args, CmdArgs); in AddPreprocessingOptions()
1528 static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, in CollectARMPACBTIOptions() argument
1537 const Driver &D = TC.getDriver(); in CollectARMPACBTIOptions()
1538 const llvm::Triple &Triple = TC.getEffectiveTriple(); in CollectARMPACBTIOptions()
1667 const ToolChain &TC = getToolChain(); in RenderTargetOptions() local
1670 getTargetFeatures(TC.getDriver(), EffectiveTriple, Args, CmdArgs, false); in RenderTargetOptions()
1673 switch (TC.getArch()) { in RenderTargetOptions()
2114 static void SetRISCVSmallDataLimit(const ToolChain &TC, const ArgList &Args, in SetRISCVSmallDataLimit() argument
2116 const Driver &D = TC.getDriver(); in SetRISCVSmallDataLimit()
2117 const llvm::Triple &Triple = TC.getTriple(); in SetRISCVSmallDataLimit()
2845 static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, in RenderFloatingPointOptions() argument
2858 bool MathErrno = TC.IsMathErrnoDefault(); in RenderFloatingPointOptions()
2873 TC.getDefaultDenormalModeForType(Args, JA); in RenderFloatingPointOptions()
2875 TC.getDefaultDenormalModeForType(Args, JA, &llvm::APFloat::IEEEsingle()); in RenderFloatingPointOptions()
3019 MathErrno = TC.IsMathErrnoDefault(); in RenderFloatingPointOptions()
3169 const llvm::Triple::ArchType Arch = TC.getArch(); in RenderFloatingPointOptions()
3238 MathErrno = TC.IsMathErrnoDefault(); in RenderFloatingPointOptions()
3484 static void RenderSSPOptions(const Driver &D, const ToolChain &TC, in RenderSSPOptions() argument
3487 const llvm::Triple &EffectiveTriple = TC.getEffectiveTriple(); in RenderSSPOptions()
3497 TC.GetDefaultStackProtectorLevel(KernelOrKext); in RenderSSPOptions()
3633 static void RenderSCPOptions(const ToolChain &TC, const ArgList &Args, in RenderSCPOptions() argument
3635 const llvm::Triple &EffectiveTriple = TC.getEffectiveTriple(); in RenderSCPOptions()
3649 const ToolChain &TC, in RenderTrivialAutoVarInitOptions() argument
3652 auto DefaultTrivialAutoVarInit = TC.GetDefaultTrivialAutoVarInit(); in RenderTrivialAutoVarInitOptions()
3869 static void RenderBuiltinOptions(const ToolChain &TC, const llvm::Triple &T, in RenderBuiltinOptions() argument
3895 if (TC.getArch() == llvm::Triple::le32) in RenderBuiltinOptions()
4189 static void RenderObjCOptions(const ToolChain &TC, const Driver &D, in RenderObjCOptions() argument
4193 const llvm::Triple::ArchType Arch = TC.getArch(); in RenderObjCOptions()
4202 if (TC.UseObjCMixedDispatch()) in RenderObjCOptions()
4218 TC.CheckObjCARC(); in RenderObjCOptions()
4226 if (TC.GetCXXStdlibType(Args) == ToolChain::CST_Libcxx) in RenderObjCOptions()
4438 renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, in renderDebugOptions() argument
4446 Args.getLastArg(options::OPT_fdebug_info_for_profiling), Args, D, TC)) in renderDebugOptions()
4458 llvm::DebuggerKind DebuggerTuning = TC.getDefaultDebuggerTuning(); in renderDebugOptions()
4471 !checkDebugInfoOption(SplitDWARFArg, Args, D, TC)) { in renderDebugOptions()
4480 if (checkDebugInfoOption(A, Args, D, TC) && in renderDebugOptions()
4500 if (checkDebugInfoOption(A, Args, D, TC)) { in renderDebugOptions()
4515 EmitDwarf = checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4519 EmitCodeView = checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4525 switch (TC.getDefaultDebugFormat()) { in renderDebugOptions()
4539 RequestedDWARFVersion = getDwarfVersion(TC, Args); in renderDebugOptions()
4542 std::min(RequestedDWARFVersion, TC.getMaxDwarfVersion()); in renderDebugOptions()
4555 (void)checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4570 (void)checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4582 TC)) { in renderDebugOptions()
4603 TC.GetDefaultStandaloneDebug()); in renderDebugOptions()
4605 (void)checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4630 << A->getAsString(Args) << TC.getTripleString() << 5 in renderDebugOptions()
4632 else if (checkDebugInfoOption(A, Args, D, TC)) in renderDebugOptions()
4655 TC.adjustDebugInfoKind(DebugInfoKind, Args); in renderDebugOptions()
4668 D, TC)) in renderDebugOptions()
4676 (PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC))) { in renderDebugOptions()
4695 checkDebugInfoOption(SimpleTemplateNamesArg, Args, D, TC)) { in renderDebugOptions()
4710 if (checkDebugInfoOption(DebugTemplateAlias, Args, D, TC)) { in renderDebugOptions()
4731 NeedAranges = checkDebugInfoOption(A, Args, D, TC) || NeedAranges; in renderDebugOptions()
4750 TC)) { in renderDebugOptions()
4760 (void)checkDebugInfoOption(A, Args, D, TC); in renderDebugOptions()
4774 TC.useIntegratedAs() || EffectiveDWARFVersion >= 5)) in renderDebugOptions()
4788 RenderDebugInfoCompressionArgs(Args, CmdArgs, D, TC); in renderDebugOptions()
4792 if (TC.getTriple().isOSBinFormatELF() || D.IsCLMode()) { in renderDebugOptions()
4810 addDebugPrefixMapArg(D, TC, Args, CmdArgs); in renderDebugOptions()
4818 static void ProcessVSRuntimeLibrary(const ToolChain &TC, const ArgList &Args, in ProcessVSRuntimeLibrary() argument
4885 if (TC.getTriple().isWindowsArm64EC()) in ProcessVSRuntimeLibrary()
4892 const auto &TC = getToolChain(); in ConstructJob() local
4893 const llvm::Triple &RawTriple = TC.getTriple(); in ConstructJob()
4894 const llvm::Triple &Triple = TC.getEffectiveTriple(); in ConstructJob()
4899 const Driver &D = TC.getDriver(); in ConstructJob()
4963 (IsCuda || IsHIP) ? TC.getAuxTriple() : nullptr; in ConstructJob()
5089 TC.addClangWarningOptions(CmdArgs); in ConstructJob()
5116 if (TC.useIntegratedAs()) { in ConstructJob()
5321 TC.addClangTargetOptions(Args, CmdArgs, JA.getOffloadingDeviceKind()); in ConstructJob()
5376 RenderFloatingPointOptions(TC, D, isOptimizationLevelFast(Args), Args, in ConstructJob()
5380 switch (TC.getArch()) { in ConstructJob()
5502 unsigned FunctionAlignment = ParseFunctionAlignment(TC, Args); in ConstructJob()
5514 TC.getDriver().Diag(diag::err_drv_invalid_int_value) in ConstructJob()
5517 TC.getDriver().Diag(diag::err_drv_alignment_not_power_of_two) in ConstructJob()
5557 std::tie(RelocationModel, PICLevel, IsPIE) = ParsePICArgs(TC, Args); in ConstructJob()
5651 if (!TC.isThreadModelSupported(A->getValue())) in ConstructJob()
5656 Model = TC.getThreadModel(); in ConstructJob()
5732 if (!TC.getTriple().isPPC32()) { in ConstructJob()
5745 if (TC.getArch() != llvm::Triple::x86) { in ConstructJob()
5847 RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA); in ConstructJob()
5850 const llvm::Triple::ArchType Arch = TC.getArch(); in ConstructJob()
5864 if (TC.getArch() == llvm::Triple::avr) in ConstructJob()
5872 if (TC.getTriple().isX86()) in ConstructJob()
5874 else if (TC.getTriple().isPPC() && in ConstructJob()
5884 bool IsIntegratedAssemblerDefault = TC.IsIntegratedAssemblerDefault(); in ConstructJob()
5907 if (!TC.useIntegratedAs() && !TC.parseInlineAsmUsingAsmParser()) in ConstructJob()
5976 auto SanitizeArgs = TC.getSanitizerArgs(Args); in ConstructJob()
5979 TC.getDefaultUnwindTableLevel(Args) == ToolChain::UnwindTableLevel::Asynchronous; in ConstructJob()
5981 TC.getDefaultUnwindTableLevel(Args) == ToolChain::UnwindTableLevel::Synchronous; in ConstructJob()
6003 getCPUName(D, HostArgs, *TC.getAuxTriple(), /*FromAs*/ false); in ConstructJob()
6008 getTargetFeatures(D, *TC.getAuxTriple(), HostArgs, CmdArgs, in ConstructJob()
6012 TC.addClangTargetOptions(Args, CmdArgs, JA.getOffloadingDeviceKind()); in ConstructJob()
6029 if (isTLSDESCEnabled(TC, Args)) in ConstructJob()
6049 renderDebugOptions(TC, D, RawTriple, Args, types::isLLVMIR(InputType), in ConstructJob()
6055 (TC.getTriple().isOSBinFormatELF() || in ConstructJob()
6056 TC.getTriple().isOSBinFormatWasm() || in ConstructJob()
6057 TC.getTriple().isOSBinFormatCOFF()) && in ConstructJob()
6081 TC.getArch() == llvm::Triple::x86) { in ConstructJob()
6225 addPGOAndCoverageFlags(TC, C, JA, Output, Args, SanitizeArgs, CmdArgs); in ConstructJob()
6238 PScpu::addProfileRTArgs(TC, Args, CmdArgs); in ConstructJob()
6239 PScpu::addSanitizerArgs(TC, Args, CmdArgs); in ConstructJob()
6424 if (!ShouldEnableAutolink(Args, TC, JA)) in ConstructJob()
6716 SanitizeArgs.addArgs(TC, Args, CmdArgs, InputType); in ConstructJob()
6718 const XRayArgs &XRay = TC.getXRayArgs(); in ConstructJob()
6719 XRay.addArgs(TC, Args, CmdArgs, InputType); in ConstructJob()
6754 if (TC.SupportsProfiling()) { in ConstructJob()
6757 llvm::Triple::ArchType Arch = TC.getArch(); in ConstructJob()
6759 if (Arch == llvm::Triple::systemz || TC.getTriple().isX86()) in ConstructJob()
6782 if (TC.getTriple().isOSzOS()) { in ConstructJob()
6788 if (!(TC.getTriple().isOSAIX() || TC.getTriple().isOSOpenBSD())) { in ConstructJob()
6796 if (TC.getTriple().isOSAIX() && !Args.hasArgNoClaim(options::OPT_pg)) in ConstructJob()
6802 if (!TC.getTriple().isOSAIX()) { in ConstructJob()
6863 RenderSSPOptions(D, TC, Args, CmdArgs, KernelOrKext); in ConstructJob()
6864 RenderSCPOptions(TC, Args, CmdArgs); in ConstructJob()
6865 RenderTrivialAutoVarInitOptions(D, TC, Args, CmdArgs); in ConstructJob()
6981 RenderBuiltinOptions(TC, RawTriple, Args, CmdArgs); in ConstructJob()
6995 TC.IsBlocksDefault()) || in ConstructJob()
7001 if (!Args.hasArg(options::OPT_fgnu_runtime) && !TC.hasBlocksRuntime()) in ConstructJob()
7006 if (TC.IsEncodeExtendedBlockSignatureDefault()) in ConstructJob()
7022 ToolChain::RTTIMode RTTIMode = TC.getRTTIMode(); in ConstructJob()
7030 TC.getArch() == llvm::Triple::hexagon || Triple.isOSzOS())) in ConstructJob()
7116 VersionTuple MSVT = TC.computeMSVCVersion(&D, Args); in ConstructJob()
7252 RenderObjCOptions(TC, D, RawTriple, Args, Runtime, rewriteKind != RK_None, in ConstructJob()
7268 EH = addExceptionArgs(Args, InputType, TC, KernelOrKext, Runtime, CmdArgs); in ConstructJob()
7285 switch (TC.GetExceptionModel(Args)) { in ConstructJob()
7635 if (TC.UseDwarfDebugFlags() || GRecordSwitches || FRecordSwitches) { in ConstructJob()
7649 if (TC.UseDwarfDebugFlags() || GRecordSwitches) { in ConstructJob()
7673 TC.getInputFilename(Input))); in ConstructJob()
7763 [](auto TC) { return TC.second->getTripleString(); }); in ConstructJob() argument
7814 (LTOMode == LTOK_Full || TC.canSplitThinLTOUnit())) || in ConstructJob()
7831 << A->getAsString(Args) << TC.getTripleString(); in ConstructJob()
7912 (TC.getTriple().isOSBinFormatELF() || in ConstructJob()
7913 TC.getTriple().isOSBinFormatCOFF()) && in ConstructJob()
7914 !TC.getTriple().isPS4() && !TC.getTriple().isVE() && in ConstructJob()
7915 !TC.getTriple().isOSNetBSD() && in ConstructJob()
7916 !Distro(D.getVFS(), TC.getTriple()).IsGentoo() && in ConstructJob()
7917 !TC.getTriple().isAndroid() && TC.useIntegratedAs())) in ConstructJob()
7927 if (!TC.getTriple().isOSBinFormatELF()) in ConstructJob()
7929 << Str << TC.getTripleString(); in ConstructJob()
8006 Clang::Clang(const ToolChain &TC, bool HasIntegratedBackend) in Clang() argument
8010 : Tool("clang", "clang frontend", TC), HasBackend(HasIntegratedBackend) {} in Clang()
8823 OA->doOnEachDependence([&](Action *A, const ToolChain *TC, const char *) { in ConstructJob() argument
8826 CurTC = TC; in ConstructJob()
8870 OA->doOnEachDependence([&](Action *, const ToolChain *TC, const char *) { in ConstructJob() argument
8872 CurTC = TC; in ConstructJob()
8990 const ToolChain *TC = OffloadAction->getOffloadingToolChain(); in ConstructJob() local
8992 C.getArgsForToolChain(TC, OffloadAction->getOffloadingArch(), in ConstructJob()
8994 StringRef File = C.getArgs().MakeArgString(TC->getInputFilename(Input)); in ConstructJob()
9003 getTargetFeatures(TC->getDriver(), TC->getTriple(), TCArgs, Features, in ConstructJob()
9008 if (TC->getTriple().isAMDGPU()) { in ConstructJob()
9019 "triple=" + TC->getTripleString(), in ConstructJob()
9024 if (TC->getDriver().isUsingLTO(/* IsOffload */ true) || in ConstructJob()
9025 TC->getTriple().isAMDGPU()) in ConstructJob()
9051 const ToolChain *TC = I.second; in ConstructJob() local
9052 if (TC->getTriple().isNVPTX()) { in ConstructJob()