clang 20.0.0git
|
#include "clang/Driver/SanitizerArgs.h"
Definition at line 24 of file SanitizerArgs.h.
SanitizerArgs::SanitizerArgs | ( | const ToolChain & | TC, |
const llvm::opt::ArgList & | Args, | ||
bool | DiagnoseErrors = true |
||
) |
Parses the sanitizer arguments from an argument list.
Definition at line 369 of file SanitizerArgs.cpp.
References addDefaultIgnorelists(), AlwaysRecoverable, clang::AsanDetectStackUseAfterReturnModeFromString(), clang::AsanDtorKindFromString(), CompatibleWithMinimalRuntime, Coverage8bitCounters, CoverageBB, CoverageControlFlow, CoverageEdge, CoverageFunc, CoverageIndirCall, CoverageInline8bitCounters, CoverageInlineBoolFlag, CoveragePCTable, CoverageStackDepth, CoverageTraceBB, CoverageTraceCmp, CoverageTraceLoads, CoverageTracePC, CoverageTracePCGuard, CoverageTraceStores, D, clang::Default, describeSanitizeArg(), clang::driver::Driver::Diag(), clang::expandSanitizerGroups(), clang::Function, clang::driver::ToolChain::getDefaultSanitizers(), clang::driver::ToolChain::getDriver(), clang::driver::ToolChain::getRTTIArg(), clang::driver::ToolChain::getRTTIMode(), clang::driver::ToolChain::getSupportedSanitizers(), clang::driver::ToolChain::getTriple(), isExecuteOnlyTarget(), lastArgumentForMask(), clang::SanitizerSet::Mask, MergeDefault, NeedsLTO, NeedsUbsanCxxRt, NotAllowedWithExecuteOnly, NotAllowedWithMinimalRuntime, NotAllowedWithTrap, parseArgValues(), parseBinaryMetadataFeatures(), parseCoverageFeatures(), parseOverflowPatternExclusionValues(), parseSanitizeArgs(), parseSanitizeTrapArgs(), parseSpecialCaseListArg(), RecoverableByDefault, clang::driver::ToolChain::RM_Disabled, setGroupBits(), SupportsCoverage, toString(), and Unrecoverable.
void SanitizerArgs::addArgs | ( | const ToolChain & | TC, |
const llvm::opt::ArgList & | Args, | ||
llvm::opt::ArgStringList & | CmdArgs, | ||
types::ID | InputType | ||
) | const |
Definition at line 1187 of file SanitizerArgs.cpp.
References addIncludeLinkerOption(), addSpecialCaseListOpt(), clang::AsanDetectStackUseAfterReturnModeToString(), clang::AsanDtorKindToString(), BinaryMetadataAtomics, BinaryMetadataCovered, BinaryMetadataUAR, CFIClasses, Coverage8bitCounters, CoverageBB, CoverageControlFlow, CoverageEdge, CoverageFunc, CoverageIndirCall, CoverageInline8bitCounters, CoverageInlineBoolFlag, CoverageNoPrune, CoveragePCTable, CoverageStackDepth, CoverageTraceBB, CoverageTraceCmp, CoverageTraceDiv, CoverageTraceGep, CoverageTraceLoads, CoverageTracePC, CoverageTracePCGuard, CoverageTraceStores, clang::driver::Driver::Diag(), clang::SanitizerSet::empty(), clang::driver::ToolChain::getCompilerRTBasename(), clang::driver::ToolChain::getDriver(), clang::driver::ToolChain::getTriple(), clang::SanitizerSet::has(), clang::SanitizerSet::hasOneOf(), hasTargetFeatureMTE(), clang::driver::types::isCXX(), lastArgumentForMask(), clang::SanitizerSet::Mask, needsStatsRt(), needsUbsanRt(), and toString().
|
inline |
Definition at line 127 of file SanitizerArgs.h.
|
inline |
Definition at line 142 of file SanitizerArgs.h.
References clang::SanitizerSet::empty().
Referenced by clang::driver::toolchains::NetBSD::addClangTargetOptions().
|
inline |
Definition at line 141 of file SanitizerArgs.h.
|
inline |
Definition at line 115 of file SanitizerArgs.h.
References hasMemtagGlobals(), hasMemtagHeap(), and hasMemtagStack().
|
inline |
Definition at line 124 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 118 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 121 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 132 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
|
inline |
Definition at line 140 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 139 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and collectSanitizerRuntimes().
|
inline |
Definition at line 84 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::PS4CPU::addSanitizerArgs(), clang::driver::toolchains::PS5CPU::addSanitizerArgs(), collectSanitizerRuntimes(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), needsFuzzerInterceptors(), and needsUbsanRt().
bool SanitizerArgs::needsCfiDiagRt | ( | ) | const |
Definition at line 354 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask.
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
bool SanitizerArgs::needsCfiRt | ( | ) | const |
Definition at line 349 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 104 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 94 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and needsFuzzerInterceptors().
bool SanitizerArgs::needsFuzzerInterceptors | ( | ) | const |
Definition at line 326 of file SanitizerArgs.cpp.
References needsAsanRt(), needsFuzzer(), needsMsanRt(), and needsTsanRt().
|
inline |
Definition at line 88 of file SanitizerArgs.h.
References needsHwasanRt().
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 85 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), clang::driver::tools::fuchsia::Linker::ConstructJob(), needsHwasanAliasesRt(), and needsUbsanRt().
|
inline |
Definition at line 95 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), and needsUbsanRt().
bool SanitizerArgs::needsLTO | ( | ) | const |
Definition at line 365 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, and NeedsLTO.
|
inline |
Definition at line 83 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 93 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), needsFuzzerInterceptors(), and needsUbsanRt().
|
inline |
Definition at line 110 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 113 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and collectSanitizerRuntimes().
|
inline |
Definition at line 105 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 109 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 80 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), and clang::driver::tools::solaris::Linker::ConstructJob().
|
inline |
Definition at line 81 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs().
|
inline |
Definition at line 108 of file SanitizerArgs.h.
Referenced by addArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), and clang::driver::tools::solaris::Linker::ConstructJob().
|
inline |
Definition at line 92 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::PS5CPU::addSanitizerArgs(), collectSanitizerRuntimes(), clang::driver::tools::fuchsia::Linker::ConstructJob(), needsFuzzerInterceptors(), and needsUbsanRt().
|
inline |
Definition at line 91 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and collectSanitizerRuntimes().
bool SanitizerArgs::needsUbsanCXXRt | ( | ) | const |
Definition at line 341 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, and NeedsUbsanCxxRt.
Referenced by collectSanitizerRuntimes().
bool SanitizerArgs::needsUbsanRt | ( | ) | const |
Definition at line 330 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, needsAsanRt(), needsCfiDiagRt(), needsDfsanRt(), needsHwasanRt(), needsLsanRt(), needsMsanRt(), needsNsanRt(), needsScudoRt(), needsTsanRt(), NeedsUbsanRt, and requiresMinimalRuntime().
Referenced by addArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::PS4CPU::addSanitizerArgs(), clang::driver::toolchains::PS5CPU::addSanitizerArgs(), collectSanitizerRuntimes(), and clang::driver::tools::solaris::Linker::ConstructJob().
bool SanitizerArgs::needsUnwindTables | ( | ) | const |
Definition at line 361 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, and NeedsUnwindTables.
|
inline |
Definition at line 103 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), clang::driver::tools::solaris::Linker::ConstructJob(), and needsUbsanRt().
bool SanitizerArgs::requiresPIE | ( | ) | const |
Definition at line 359 of file SanitizerArgs.cpp.
Referenced by clang::driver::toolchains::FreeBSD::isPIEDefault(), and clang::driver::toolchains::Linux::isPIEDefault().