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 317 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, NeedsLTO, NeedsUbsanCxxRt, NotAllowedWithExecuteOnly, NotAllowedWithMinimalRuntime, NotAllowedWithTrap, parseArgValues(), parseBinaryMetadataFeatures(), parseCoverageFeatures(), 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 1130 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 122 of file SanitizerArgs.h.
|
inline |
Definition at line 137 of file SanitizerArgs.h.
References clang::SanitizerSet::empty().
Referenced by clang::driver::toolchains::NetBSD::addClangTargetOptions().
|
inline |
Definition at line 136 of file SanitizerArgs.h.
|
inline |
Definition at line 110 of file SanitizerArgs.h.
References hasMemtagGlobals(), hasMemtagHeap(), and hasMemtagStack().
|
inline |
Definition at line 119 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 113 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 116 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by hasMemTag().
|
inline |
Definition at line 127 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
|
inline |
Definition at line 135 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 134 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs().
|
inline |
Definition at line 82 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 302 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask.
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
bool SanitizerArgs::needsCfiRt | ( | ) | const |
Definition at line 297 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 100 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 91 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and needsFuzzerInterceptors().
bool SanitizerArgs::needsFuzzerInterceptors | ( | ) | const |
Definition at line 282 of file SanitizerArgs.cpp.
References needsAsanRt(), needsFuzzer(), needsMsanRt(), and needsTsanRt().
|
inline |
Definition at line 86 of file SanitizerArgs.h.
References needsHwasanRt().
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 83 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), clang::driver::tools::fuchsia::Linker::ConstructJob(), needsHwasanAliasesRt(), and needsUbsanRt().
|
inline |
Definition at line 92 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 313 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, and NeedsLTO.
|
inline |
Definition at line 81 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 90 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), needsFuzzerInterceptors(), and needsUbsanRt().
|
inline |
Definition at line 106 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 101 of file SanitizerArgs.h.
Referenced by collectSanitizerRuntimes().
|
inline |
Definition at line 105 of file SanitizerArgs.h.
References clang::SanitizerSet::has().
Referenced by collectSanitizerRuntimes(), and needsUbsanRt().
|
inline |
Definition at line 78 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 79 of file SanitizerArgs.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs().
|
inline |
Definition at line 104 of file SanitizerArgs.h.
Referenced by addArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), and clang::driver::tools::solaris::Linker::ConstructJob().
|
inline |
Definition at line 89 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().
bool SanitizerArgs::needsUbsanRt | ( | ) | const |
Definition at line 286 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 309 of file SanitizerArgs.cpp.
References clang::SanitizerSet::Mask, and NeedsUnwindTables.
|
inline |
Definition at line 99 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 307 of file SanitizerArgs.cpp.
Referenced by clang::driver::toolchains::FreeBSD::isPIEDefault(), and clang::driver::toolchains::Linux::isPIEDefault().