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) { |
Chandler Carruth | 9b4df49 | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 23 | initializeAddressSanitizerPass(Registry); |
Kostya Serebryany | 1416edc | 2012-11-28 10:31:36 +0000 | [diff] [blame] | 24 | initializeAddressSanitizerModulePass(Registry); |
Chandler Carruth | 9b4df49 | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 25 | initializeBoundsCheckingPass(Registry); |
Owen Anderson | aa4897f | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 26 | initializeEdgeProfilerPass(Registry); |
Chandler Carruth | 9b4df49 | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 27 | initializeGCOVProfilerPass(Registry); |
Owen Anderson | aa4897f | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 28 | initializeOptimalEdgeProfilerPass(Registry); |
Andrew Trick | 04317cc | 2011-01-29 01:09:53 +0000 | [diff] [blame] | 29 | initializePathProfilerPass(Registry); |
Kostya Serebryany | 60ebb194 | 2012-02-13 22:50:51 +0000 | [diff] [blame] | 30 | initializeThreadSanitizerPass(Registry); |
Owen Anderson | aa4897f | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | /// LLVMInitializeInstrumentation - C binding for |
| 34 | /// initializeInstrumentation. |
| 35 | void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) { |
| 36 | initializeInstrumentation(*unwrap(R)); |
| 37 | } |