LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::AddressSanitizerPass Class Reference

Public interface to the address sanitizer module pass for instrumenting code to check for various memory errors. More...

#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"

Inheritance diagram for llvm::AddressSanitizerPass:
Inheritance graph
[legend]

Public Member Functions

 AddressSanitizerPass (const AddressSanitizerOptions &Options, bool UseGlobalGC=true, bool UseOdrIndicator=true, AsanDtorKind DestructorKind=AsanDtorKind::Global, AsanCtorKind ConstructorKind=AsanCtorKind::Global)
 
PreservedAnalyses run (Module &M, ModuleAnalysisManager &AM)
 
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 
- Public Member Functions inherited from llvm::PassInfoMixin< AddressSanitizerPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Static Public Member Functions

static bool isRequired ()
 
- Static Public Member Functions inherited from llvm::PassInfoMixin< AddressSanitizerPass >
static StringRef name ()
 Gets the name of the pass we are mixed into.
 

Detailed Description

Public interface to the address sanitizer module pass for instrumenting code to check for various memory errors.

This adds 'asan.module_ctor' to 'llvm.global_ctors'. This pass may also run intependently of the function address sanitizer.

Definition at line 39 of file AddressSanitizer.h.

Constructor & Destructor Documentation

◆ AddressSanitizerPass()

AddressSanitizerPass::AddressSanitizerPass ( const AddressSanitizerOptions Options,
bool  UseGlobalGC = true,
bool  UseOdrIndicator = true,
AsanDtorKind  DestructorKind = AsanDtorKind::Global,
AsanCtorKind  ConstructorKind = AsanCtorKind::Global 
)

Definition at line 1242 of file AddressSanitizer.cpp.

Member Function Documentation

◆ isRequired()

static bool llvm::AddressSanitizerPass::isRequired ( )
inlinestatic

Definition at line 48 of file AddressSanitizer.h.

◆ printPipeline()

void AddressSanitizerPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 
)

Definition at line 1232 of file AddressSanitizer.cpp.

References llvm::AddressSanitizerOptions::CompileKernel, OS, and printPipeline().

Referenced by printPipeline().

◆ run()

PreservedAnalyses AddressSanitizerPass::run ( Module M,
ModuleAnalysisManager AM 
)

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