1 //===- InstrumentationBindings.cpp - instrumentation bindings -------------===//
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 C bindings for the instrumentation component.
12 //===----------------------------------------------------------------------===//
14 #include "InstrumentationBindings.h"
16 #include "llvm-c/Core.h"
17 #include "llvm/IR/Module.h"
18 #include "llvm/PassManager.h"
19 #include "llvm/Transforms/Instrumentation.h"
23 void LLVMAddAddressSanitizerFunctionPass(LLVMPassManagerRef PM) {
24 unwrap(PM)->add(createAddressSanitizerFunctionPass());
27 void LLVMAddAddressSanitizerModulePass(LLVMPassManagerRef PM) {
28 unwrap(PM)->add(createAddressSanitizerModulePass());
31 void LLVMAddThreadSanitizerPass(LLVMPassManagerRef PM) {
32 unwrap(PM)->add(createThreadSanitizerPass());
35 void LLVMAddMemorySanitizerPass(LLVMPassManagerRef PM) {
36 unwrap(PM)->add(createMemorySanitizerPass());
39 void LLVMAddDataFlowSanitizerPass(LLVMPassManagerRef PM,
40 const char *ABIListFile) {
41 unwrap(PM)->add(createDataFlowSanitizerPass(ABIListFile));