LLVM 20.0.0git
|
#include "llvm/Transforms/Utils/SanitizerStats.h"
Public Member Functions | |
SanitizerStatReport (Module *M) | |
void | create (IRBuilder<> &B, SanitizerStatKind SK) |
Generates code into B that increments a location-specific counter tagged with the given sanitizer kind SK. | |
void | finish () |
Finalize module stats array and add global constructor to register it. | |
Definition at line 32 of file SanitizerStats.h.
SanitizerStatReport::SanitizerStatReport | ( | Module * | M | ) |
Definition at line 23 of file SanitizerStats.cpp.
References llvm::ArrayType::get(), llvm::PointerType::getUnqual(), and llvm::GlobalValue::InternalLinkage.
void SanitizerStatReport::create | ( | IRBuilder<> & | B, |
SanitizerStatKind | SK | ||
) |
Generates code into B that increments a location-specific counter tagged with the given sanitizer kind SK.
Definition at line 42 of file SanitizerStats.cpp.
References B, F, llvm::ConstantArray::get(), llvm::ArrayType::get(), llvm::FunctionType::get(), llvm::IntegerType::getBitWidth(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getIntToPtr(), llvm::Constant::getNullValue(), and llvm::kSanitizerStatKindBits.
void SanitizerStatReport::finish | ( | ) |
Finalize module stats array and add global constructor to register it.
Definition at line 70 of file SanitizerStats.cpp.
References llvm::appendToGlobalCtors(), B, llvm::Function::Create(), llvm::BasicBlock::Create(), llvm::GlobalVariable::eraseFromParent(), F, llvm::ConstantArray::get(), llvm::FunctionType::get(), llvm::ConstantStruct::getAnon(), llvm::Module::getContext(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::Module::getOrInsertFunction(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), llvm::GlobalValue::InternalLinkage, and llvm::Value::replaceAllUsesWith().