forked from nsf/gollvm
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtransforms_instrumentation.cpp
More file actions
33 lines (25 loc) · 1001 Bytes
/
transforms_instrumentation.cpp
File metadata and controls
33 lines (25 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2014 The go-llvm Authors.
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
#include "transforms_instrumentation.h"
#include "llvm-c/Core.h"
#include "llvm/IR/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Transforms/Instrumentation.h"
using namespace llvm;
void gollvm_AddAddressSanitizerFunctionPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createAddressSanitizerFunctionPass());
}
void gollvm_AddAddressSanitizerModulePass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createAddressSanitizerModulePass());
}
void gollvm_AddThreadSanitizerPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createThreadSanitizerPass());
}
void gollvm_AddMemorySanitizerPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createMemorySanitizerPass());
}
void gollvm_AddDataFlowSanitizerPass(LLVMPassManagerRef PM,
const char *ABIListFile) {
unwrap(PM)->add(createDataFlowSanitizerPass(ABIListFile));
}