clang 24.0.0git
clang::driver::SanitizerArgs Class Reference

#include "clang/Driver/SanitizerArgs.h"

Public Member Functions

 SanitizerArgs (const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors=true, bool DiagnoseBoundArchErrors=true, BoundArch BA={}, Action::OffloadKind DeviceOffloadKind=Action::OFK_None)
 Parses the sanitizer arguments from an argument list.
bool needsSharedRt () const
bool needsStableAbi () const
bool needsMemProfRt () const
bool needsAsanRt () const
bool needsHwasanRt () const
bool needsHwasanAliasesRt () const
bool needsTysanRt () const
bool needsTsanRt () const
bool needsCsanRt () const
bool needsMsanRt () const
bool needsFuzzer () const
bool needsLsanRt () const
bool needsCopyProfRt () const
bool needsFuzzerInterceptors () const
bool needsUbsanRt () const
bool needsUbsanCXXRt () const
bool requiresMinimalRuntime () const
bool needsUbsanLoopDetectRt () const
bool needsDfsanRt () const
bool needsSafeStackRt () const
bool needsCfiCrossDsoRt () const
bool needsCfiCrossDsoDiagRt () const
bool needsStatsRt () const
bool needsScudoRt () const
bool needsNsanRt () const
bool needsRtsanRt () const
bool hasMemTag () const
bool hasMemtagHeap () const
bool hasMemtagStack () const
bool hasMemtagGlobals () const
const std::string & getMemtagMode () const
bool hasShadowCallStack () const
bool requiresPIE () const
bool needsUnwindTables () const
bool needsLTO () const
bool linkRuntimes () const
bool linkCXXRuntimes () const
bool hasCrossDsoCfi () const
bool hasAnySanitizer () const
void addArgs (const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const

Detailed Description

Definition at line 27 of file SanitizerArgs.h.

Constructor & Destructor Documentation

◆ SanitizerArgs()

SanitizerArgs::SanitizerArgs ( const ToolChain & TC,
const llvm::opt::ArgList & Args,
bool DiagnoseErrors = true,
bool DiagnoseBoundArchErrors = true,
BoundArch BA = {},
Action::OffloadKind DeviceOffloadKind = Action::OFK_None )

Parses the sanitizer arguments from an argument list.

Definition at line 436 of file SanitizerArgs.cpp.

References addDefaultIgnorelists(), AlwaysRecoverable, AnnotateDebugInfoDefault, clang::BoundArch::ArchName, clang::AsanDetectStackUseAfterReturnModeFromString(), clang::AsanDtorKindFromString(), clang::driver::Driver::CCCIsCXX(), CompatibleWithMinimalRuntime, Coverage8bitCounters, CoverageBB, CoverageControlFlow, CoverageEdge, CoverageFunc, CoverageIndirCall, CoverageInline8bitCounters, CoverageInlineBoolFlag, CoveragePCTable, CoverageStackDepth, CoverageTraceBB, CoverageTraceCmp, CoverageTraceLoads, CoverageTracePC, CoverageTracePCEntryExit, CoverageTracePCGuard, CoverageTraceStores, clang::Default, describeSanitizeArg(), clang::driver::Driver::Diag(), clang::expandSanitizerGroups(), clang::driver::ToolChain::getDefaultSanitizers(), clang::driver::ToolChain::getDriver(), getHexagonFixedRegOption(), clang::driver::ToolChain::getRTTIArg(), clang::driver::ToolChain::getRTTIMode(), clang::driver::ToolChain::getSanitizerRequirement(), clang::driver::ToolChain::getSupportedSanitizers(), clang::driver::ToolChain::getTriple(), clang::Incompatible, isExecuteOnlyTarget(), clang::driver::ToolChain::isUsingLTO(), lastArgumentForMask(), clang::SanitizerSet::Mask, MergeDefault, NeedsLTO, NeedsUbsanCxxRt, NotAllowedWithExecuteOnly, NotAllowedWithMinimalRuntime, NotAllowedWithTrap, clang::driver::Action::OFK_Host, clang::driver::Action::OFK_None, parseArgValues(), parseBinaryMetadataFeatures(), parseCoverageFeatures(), parseOverflowPatternExclusionValues(), parseSanitizeArgs(), parseSanitizeSkipHotCutoffArgs(), parseSanitizeTrapArgs(), parseSpecialCaseListArg(), RecoverableByDefault, clang::driver::ToolChain::RM_Disabled, setGroupBits(), SupportsCoverage, toString(), and Unrecoverable.

Member Function Documentation

◆ addArgs()

◆ getMemtagMode()

const std::string & clang::driver::SanitizerArgs::getMemtagMode ( ) const
inline

Definition at line 149 of file SanitizerArgs.h.

◆ hasAnySanitizer()

bool clang::driver::SanitizerArgs::hasAnySanitizer ( ) const
inline

◆ hasCrossDsoCfi()

bool clang::driver::SanitizerArgs::hasCrossDsoCfi ( ) const
inline

Definition at line 163 of file SanitizerArgs.h.

◆ hasMemTag()

bool clang::driver::SanitizerArgs::hasMemTag ( ) const
inline

Definition at line 137 of file SanitizerArgs.h.

References hasMemtagGlobals(), hasMemtagHeap(), and hasMemtagStack().

◆ hasMemtagGlobals()

bool clang::driver::SanitizerArgs::hasMemtagGlobals ( ) const
inline

Definition at line 146 of file SanitizerArgs.h.

Referenced by hasMemTag().

◆ hasMemtagHeap()

bool clang::driver::SanitizerArgs::hasMemtagHeap ( ) const
inline

Definition at line 140 of file SanitizerArgs.h.

Referenced by hasMemTag().

◆ hasMemtagStack()

bool clang::driver::SanitizerArgs::hasMemtagStack ( ) const
inline

Definition at line 143 of file SanitizerArgs.h.

Referenced by hasMemTag().

◆ hasShadowCallStack()

bool clang::driver::SanitizerArgs::hasShadowCallStack ( ) const
inline

Definition at line 154 of file SanitizerArgs.h.

◆ linkCXXRuntimes()

bool clang::driver::SanitizerArgs::linkCXXRuntimes ( ) const
inline

Definition at line 162 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ linkRuntimes()

bool clang::driver::SanitizerArgs::linkRuntimes ( ) const
inline

◆ needsAsanRt()

◆ needsCfiCrossDsoDiagRt()

bool SanitizerArgs::needsCfiCrossDsoDiagRt ( ) const

Definition at line 420 of file SanitizerArgs.cpp.

Referenced by collectSanitizerRuntimes(), needsCfiCrossDsoRt(), and needsUbsanRt().

◆ needsCfiCrossDsoRt()

bool SanitizerArgs::needsCfiCrossDsoRt ( ) const

Definition at line 415 of file SanitizerArgs.cpp.

References needsCfiCrossDsoDiagRt().

Referenced by collectSanitizerRuntimes().

◆ needsCopyProfRt()

bool clang::driver::SanitizerArgs::needsCopyProfRt ( ) const
inline

Definition at line 120 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ needsCsanRt()

bool clang::driver::SanitizerArgs::needsCsanRt ( ) const
inline

◆ needsDfsanRt()

bool clang::driver::SanitizerArgs::needsDfsanRt ( ) const
inline

Definition at line 126 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsFuzzer()

bool clang::driver::SanitizerArgs::needsFuzzer ( ) const
inline

◆ needsFuzzerInterceptors()

bool SanitizerArgs::needsFuzzerInterceptors ( ) const

Definition at line 388 of file SanitizerArgs.cpp.

References needsAsanRt(), needsFuzzer(), needsMsanRt(), and needsTsanRt().

◆ needsHwasanAliasesRt()

bool clang::driver::SanitizerArgs::needsHwasanAliasesRt ( ) const
inline

Definition at line 105 of file SanitizerArgs.h.

References needsHwasanRt().

Referenced by collectSanitizerRuntimes().

◆ needsHwasanRt()

bool clang::driver::SanitizerArgs::needsHwasanRt ( ) const
inline

◆ needsLsanRt()

bool clang::driver::SanitizerArgs::needsLsanRt ( ) const
inline

◆ needsLTO()

bool SanitizerArgs::needsLTO ( ) const

Definition at line 432 of file SanitizerArgs.cpp.

References NeedsLTO.

◆ needsMemProfRt()

bool clang::driver::SanitizerArgs::needsMemProfRt ( ) const
inline

◆ needsMsanRt()

bool clang::driver::SanitizerArgs::needsMsanRt ( ) const
inline

◆ needsNsanRt()

bool clang::driver::SanitizerArgs::needsNsanRt ( ) const
inline

Definition at line 132 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsRtsanRt()

bool clang::driver::SanitizerArgs::needsRtsanRt ( ) const
inline

◆ needsSafeStackRt()

bool clang::driver::SanitizerArgs::needsSafeStackRt ( ) const
inline

Definition at line 127 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ needsScudoRt()

bool clang::driver::SanitizerArgs::needsScudoRt ( ) const
inline

Definition at line 131 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsSharedRt()

◆ needsStableAbi()

bool clang::driver::SanitizerArgs::needsStableAbi ( ) const
inline

◆ needsStatsRt()

bool clang::driver::SanitizerArgs::needsStatsRt ( ) const
inline

◆ needsTsanRt()

◆ needsTysanRt()

bool clang::driver::SanitizerArgs::needsTysanRt ( ) const
inline

◆ needsUbsanCXXRt()

bool SanitizerArgs::needsUbsanCXXRt ( ) const

Definition at line 407 of file SanitizerArgs.cpp.

References NeedsUbsanCxxRt.

Referenced by collectSanitizerRuntimes().

◆ needsUbsanLoopDetectRt()

bool clang::driver::SanitizerArgs::needsUbsanLoopDetectRt ( ) const
inline

Definition at line 125 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ needsUbsanRt()

◆ needsUnwindTables()

bool SanitizerArgs::needsUnwindTables ( ) const

Definition at line 428 of file SanitizerArgs.cpp.

References NeedsUnwindTables.

◆ requiresMinimalRuntime()

◆ requiresPIE()

bool SanitizerArgs::requiresPIE ( ) const

The documentation for this class was generated from the following files: