1 //===- transforms_instrumentation.go - Bindings for instrumentation -------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines bindings for the instrumentation component.
12 //===----------------------------------------------------------------------===//
17 #include "InstrumentationBindings.h"
23 func (pm PassManager) AddAddressSanitizerFunctionPass() {
24 C.LLVMAddAddressSanitizerFunctionPass(pm.C)
27 func (pm PassManager) AddAddressSanitizerModulePass() {
28 C.LLVMAddAddressSanitizerModulePass(pm.C)
31 func (pm PassManager) AddThreadSanitizerPass() {
32 C.LLVMAddThreadSanitizerPass(pm.C)
35 func (pm PassManager) AddMemorySanitizerPass() {
36 C.LLVMAddMemorySanitizerPass(pm.C)
39 func (pm PassManager) AddDataFlowSanitizerPass(abilist string) {
40 cabilist := C.CString(abilist)
41 defer C.free(unsafe.Pointer(cabilist))
42 C.LLVMAddDataFlowSanitizerPass(pm.C, cabilist)