mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 13:21:43 +00:00
Implemented AddressSanitizer::getPassName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db4b85f532
commit
2587804203
@ -143,6 +143,7 @@ class BlackList {
|
|||||||
/// AddressSanitizer: instrument the code in module to find memory bugs.
|
/// AddressSanitizer: instrument the code in module to find memory bugs.
|
||||||
struct AddressSanitizer : public ModulePass {
|
struct AddressSanitizer : public ModulePass {
|
||||||
AddressSanitizer();
|
AddressSanitizer();
|
||||||
|
virtual const char *getPassName() const;
|
||||||
void instrumentMop(Instruction *I);
|
void instrumentMop(Instruction *I);
|
||||||
void instrumentAddress(Instruction *OrigIns, IRBuilder<> &IRB,
|
void instrumentAddress(Instruction *OrigIns, IRBuilder<> &IRB,
|
||||||
Value *Addr, uint32_t TypeSize, bool IsWrite);
|
Value *Addr, uint32_t TypeSize, bool IsWrite);
|
||||||
@ -205,6 +206,10 @@ ModulePass *llvm::createAddressSanitizerPass() {
|
|||||||
return new AddressSanitizer();
|
return new AddressSanitizer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *AddressSanitizer::getPassName() const {
|
||||||
|
return "AddressSanitizer";
|
||||||
|
}
|
||||||
|
|
||||||
// Create a constant for Str so that we can pass it to the run-time lib.
|
// Create a constant for Str so that we can pass it to the run-time lib.
|
||||||
static GlobalVariable *createPrivateGlobalForString(Module &M, StringRef Str) {
|
static GlobalVariable *createPrivateGlobalForString(Module &M, StringRef Str) {
|
||||||
Constant *StrConst = ConstantArray::get(M.getContext(), Str);
|
Constant *StrConst = ConstantArray::get(M.getContext(), Str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user