Go bindings: introduce llvm.TemporaryMDNode.
[oota-llvm.git] / bindings / go / llvm / transforms_instrumentation.go
1 //===- transforms_instrumentation.go - Bindings for instrumentation -------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines bindings for the instrumentation component.
11 //
12 //===----------------------------------------------------------------------===//
13
14 package llvm
15
16 /*
17 #include "InstrumentationBindings.h"
18 #include <stdlib.h>
19 */
20 import "C"
21 import "unsafe"
22
23 func (pm PassManager) AddAddressSanitizerFunctionPass() {
24         C.LLVMAddAddressSanitizerFunctionPass(pm.C)
25 }
26
27 func (pm PassManager) AddAddressSanitizerModulePass() {
28         C.LLVMAddAddressSanitizerModulePass(pm.C)
29 }
30
31 func (pm PassManager) AddThreadSanitizerPass() {
32         C.LLVMAddThreadSanitizerPass(pm.C)
33 }
34
35 func (pm PassManager) AddMemorySanitizerPass() {
36         C.LLVMAddMemorySanitizerPass(pm.C)
37 }
38
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)
43 }