8ba102559bb6aeb9423d6d10587dd34e57be63d0
[oota-llvm.git] / lib / Transforms / Instrumentation / Instrumentation.cpp
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
18 using namespace llvm;
19
20 /// initializeInstrumentation - Initialize all passes in the TransformUtils
21 /// library.
22 void llvm::initializeInstrumentation(PassRegistry &Registry) {
23   initializeAddressSanitizerPass(Registry);
24   initializeAddressSanitizerModulePass(Registry);
25   initializeBoundsCheckingPass(Registry);
26   initializeEdgeProfilerPass(Registry);
27   initializeGCOVProfilerPass(Registry);
28   initializeOptimalEdgeProfilerPass(Registry);
29   initializePathProfilerPass(Registry);
30   initializeMemorySanitizerPass(Registry);
31   initializeThreadSanitizerPass(Registry);
32 }
33
34 /// LLVMInitializeInstrumentation - C binding for
35 /// initializeInstrumentation.
36 void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) {
37   initializeInstrumentation(*unwrap(R));
38 }