clang API Documentation
#include <SanitizerMetadata.h>
Public Member Functions | |
SanitizerMetadata (CodeGenModule &CGM) | |
void | reportGlobalToASan (llvm::GlobalVariable *GV, const VarDecl &D, bool IsDynInit=false) |
void | reportGlobalToASan (llvm::GlobalVariable *GV, SourceLocation Loc, StringRef Name, QualType Ty, bool IsDynInit=false, bool IsBlacklisted=false) |
void | disableSanitizerForGlobal (llvm::GlobalVariable *GV) |
void | disableSanitizerForInstruction (llvm::Instruction *I) |
Definition at line 33 of file SanitizerMetadata.h.
SanitizerMetadata::SanitizerMetadata | ( | CodeGenModule & | CGM | ) |
Definition at line 22 of file SanitizerMetadata.cpp.
void SanitizerMetadata::disableSanitizerForGlobal | ( | llvm::GlobalVariable * | GV | ) |
Definition at line 65 of file SanitizerMetadata.cpp.
References clang::CodeGen::CodeGenModule::getLangOpts(), clang::SanitizerSet::has(), reportGlobalToASan(), and clang::LangOptions::Sanitize.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), and clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor().
void SanitizerMetadata::disableSanitizerForInstruction | ( | llvm::Instruction * | I | ) |
Definition at line 72 of file SanitizerMetadata.cpp.
References clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenModule::getModule().
Referenced by clang::CodeGen::CodeGenFunction::InsertHelper().
void SanitizerMetadata::reportGlobalToASan | ( | llvm::GlobalVariable * | GV, |
const VarDecl & | D, | ||
bool | IsDynInit = false |
||
) |
Definition at line 55 of file SanitizerMetadata.cpp.
References clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::SanitizerSet::has(), clang::NamedDecl::printQualifiedName(), and clang::LangOptions::Sanitize.
Referenced by disableSanitizerForGlobal(), and clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
void SanitizerMetadata::reportGlobalToASan | ( | llvm::GlobalVariable * | GV, |
SourceLocation | Loc, | ||
StringRef | Name, | ||
QualType | Ty, | ||
bool | IsDynInit = false , |
||
bool | IsBlacklisted = false |
||
) |
Definition at line 24 of file SanitizerMetadata.cpp.
References clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), and clang::LangOptions::Sanitize.