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