Owen Anderson | aa4897f | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 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 | initializeEdgeProfilerPass(Registry); |
| 24 | initializeOptimalEdgeProfilerPass(Registry); |
Andrew Trick | 04317cc | 2011-01-29 01:09:53 +0000 | [diff] [blame] | 25 | initializePathProfilerPass(Registry); |
Nick Lewycky | b192870 | 2011-04-16 01:20:23 +0000 | [diff] [blame] | 26 | initializeGCOVProfilerPass(Registry); |
Kostya Serebryany | 800e03f | 2011-11-16 01:35:23 +0000 | [diff] [blame] | 27 | initializeAddressSanitizerPass(Registry); |
Owen Anderson | aa4897f | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | /// LLVMInitializeInstrumentation - C binding for |
| 31 | /// initializeInstrumentation. |
| 32 | void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) { |
| 33 | initializeInstrumentation(*unwrap(R)); |
| 34 | } |