clang 20.0.0git
Public Member Functions | List of all members
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)
 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 needsTsanRt () const
 
bool needsMsanRt () const
 
bool needsFuzzer () const
 
bool needsLsanRt () const
 
bool needsFuzzerInterceptors () const
 
bool needsUbsanRt () const
 
bool requiresMinimalRuntime () const
 
bool needsDfsanRt () const
 
bool needsSafeStackRt () const
 
bool needsCfiRt () const
 
bool needsCfiDiagRt () const
 
bool needsStatsRt () const
 
bool needsScudoRt () const
 
bool needsNsanRt () 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 24 of file SanitizerArgs.h.

Constructor & Destructor Documentation

◆ SanitizerArgs()

SanitizerArgs::SanitizerArgs ( const ToolChain TC,
const llvm::opt::ArgList &  Args,
bool  DiagnoseErrors = true 
)

Member Function Documentation

◆ addArgs()

void SanitizerArgs::addArgs ( const ToolChain TC,
const llvm::opt::ArgList &  Args,
llvm::opt::ArgStringList &  CmdArgs,
types::ID  InputType 
) const

◆ getMemtagMode()

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

Definition at line 122 of file SanitizerArgs.h.

◆ hasAnySanitizer()

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

◆ hasCrossDsoCfi()

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

Definition at line 136 of file SanitizerArgs.h.

◆ hasMemTag()

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

Definition at line 110 of file SanitizerArgs.h.

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

◆ hasMemtagGlobals()

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

Definition at line 119 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by hasMemTag().

◆ hasMemtagHeap()

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

Definition at line 113 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by hasMemTag().

◆ hasMemtagStack()

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

Definition at line 116 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by hasMemTag().

◆ hasShadowCallStack()

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

Definition at line 127 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

◆ linkCXXRuntimes()

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

Definition at line 135 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ linkRuntimes()

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

◆ needsAsanRt()

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

◆ needsCfiDiagRt()

bool SanitizerArgs::needsCfiDiagRt ( ) const

Definition at line 302 of file SanitizerArgs.cpp.

References clang::SanitizerSet::Mask.

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsCfiRt()

bool SanitizerArgs::needsCfiRt ( ) const

Definition at line 297 of file SanitizerArgs.cpp.

References clang::SanitizerSet::Mask.

Referenced by collectSanitizerRuntimes().

◆ needsDfsanRt()

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

Definition at line 100 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsFuzzer()

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

◆ needsFuzzerInterceptors()

bool SanitizerArgs::needsFuzzerInterceptors ( ) const

Definition at line 282 of file SanitizerArgs.cpp.

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

◆ needsHwasanAliasesRt()

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

Definition at line 86 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 313 of file SanitizerArgs.cpp.

References clang::SanitizerSet::Mask, and NeedsLTO.

◆ needsMemProfRt()

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

Definition at line 81 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ needsMsanRt()

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

◆ needsNsanRt()

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

Definition at line 106 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsSafeStackRt()

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

Definition at line 101 of file SanitizerArgs.h.

Referenced by collectSanitizerRuntimes().

◆ needsScudoRt()

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

Definition at line 105 of file SanitizerArgs.h.

References clang::SanitizerSet::has().

Referenced by collectSanitizerRuntimes(), and needsUbsanRt().

◆ needsSharedRt()

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

◆ needsStableAbi()

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

◆ needsStatsRt()

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

◆ needsTsanRt()

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

◆ needsUbsanRt()

bool SanitizerArgs::needsUbsanRt ( ) const

◆ needsUnwindTables()

bool SanitizerArgs::needsUnwindTables ( ) const

Definition at line 309 of file SanitizerArgs.cpp.

References clang::SanitizerSet::Mask, and NeedsUnwindTables.

◆ requiresMinimalRuntime()

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

◆ requiresPIE()

bool SanitizerArgs::requiresPIE ( ) const

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