LLVM
8.0.1
|
#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. More... | |
void | finish () |
Finalize module stats array and add global constructor to register it. More... | |
Definition at line 33 of file SanitizerStats.h.
SanitizerStatReport::SanitizerStatReport | ( | Module * | M | ) |
Definition at line 25 of file SanitizerStats.cpp.
References llvm::StructType::get(), llvm::ArrayType::get(), llvm::Module::getContext(), llvm::Type::getInt32Ty(), llvm::Type::getInt8PtrTy(), 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 43 of file SanitizerStats.cpp.
References llvm::IRBuilder< T, Inserter >::CreateCall(), F(), llvm::ConstantInt::get(), llvm::FunctionType::get(), llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::ConstantExpr::getBitCast(), llvm::IntegerType::getBitWidth(), llvm::Module::getDataLayout(), llvm::ConstantExpr::getGetElementPtr(), llvm::IRBuilderBase::GetInsertBlock(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::IRBuilderBase::getIntPtrTy(), llvm::ConstantExpr::getIntToPtr(), llvm::Constant::getNullValue(), llvm::Module::getOrInsertFunction(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::IRBuilderBase::getVoidTy(), and llvm::kSanitizerStatKindBits.
void SanitizerStatReport::finish | ( | ) |
Finalize module stats array and add global constructor to register it.
Definition at line 72 of file SanitizerStats.cpp.
References llvm::appendToGlobalCtors(), B, llvm::BasicBlock::Create(), llvm::Function::Create(), llvm::GlobalVariable::eraseFromParent(), F(), llvm::ConstantInt::get(), llvm::FunctionType::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::getAnon(), llvm::ConstantExpr::getBitCast(), llvm::Module::getContext(), llvm::Type::getInt32Ty(), llvm::Type::getInt8PtrTy(), llvm::Constant::getNullValue(), llvm::Module::getOrInsertFunction(), llvm::GlobalValue::getType(), llvm::Type::getVoidTy(), Int32Ty, llvm::GlobalValue::InternalLinkage, and llvm::Value::replaceAllUsesWith().