1 //===-- Instrumentation.cpp - TransformUtils Infrastructure ---------------===//
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 the common initialization infrastructure for the
11 // Instrumentation library.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #include "llvm/InitializePasses.h"
16 #include "llvm-c/Initialization.h"
17 #include "llvm/PassRegistry.h"
18 
19 using namespace llvm;
20 
21 /// initializeInstrumentation - Initialize all passes in the TransformUtils
22 /// library.
initializeInstrumentation(PassRegistry & Registry)23 void llvm::initializeInstrumentation(PassRegistry &Registry) {
24   initializeAddressSanitizerPass(Registry);
25   initializeAddressSanitizerModulePass(Registry);
26   initializeBoundsCheckingPass(Registry);
27   initializeGCOVProfilerPass(Registry);
28   initializeInstrProfilingPass(Registry);
29   initializeMemorySanitizerPass(Registry);
30   initializeThreadSanitizerPass(Registry);
31   initializeSanitizerCoverageModulePass(Registry);
32   initializeDataFlowSanitizerPass(Registry);
33 }
34 
35 /// LLVMInitializeInstrumentation - C binding for
36 /// initializeInstrumentation.
LLVMInitializeInstrumentation(LLVMPassRegistryRef R)37 void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) {
38   initializeInstrumentation(*unwrap(R));
39 }
40