Owen Anderson | 9786868 | 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" |
Chandler Carruth | 8a8cd2b | 2014-01-07 11:48:04 +0000 | [diff] [blame] | 17 | #include "llvm/PassRegistry.h" |
Owen Anderson | 9786868 | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 18 | |
| 19 | using namespace llvm; |
| 20 | |
| 21 | /// initializeInstrumentation - Initialize all passes in the TransformUtils |
| 22 | /// library. |
| 23 | void llvm::initializeInstrumentation(PassRegistry &Registry) { |
Chandler Carruth | c8acd7c | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 24 | initializeAddressSanitizerPass(Registry); |
Kostya Serebryany | dfe9e79 | 2012-11-28 10:31:36 +0000 | [diff] [blame] | 25 | initializeAddressSanitizerModulePass(Registry); |
Chandler Carruth | c8acd7c | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 26 | initializeBoundsCheckingPass(Registry); |
Chandler Carruth | c8acd7c | 2012-07-22 05:19:32 +0000 | [diff] [blame] | 27 | initializeGCOVProfilerPass(Registry); |
Justin Bogner | 61ba2e3 | 2014-12-08 18:02:35 +0000 | [diff] [blame] | 28 | initializeInstrProfilingPass(Registry); |
Evgeniy Stepanov | d4bd7b7 | 2012-11-29 09:57:20 +0000 | [diff] [blame] | 29 | initializeMemorySanitizerPass(Registry); |
Kostya Serebryany | e2a0e41 | 2012-02-13 22:50:51 +0000 | [diff] [blame] | 30 | initializeThreadSanitizerPass(Registry); |
Kostya Serebryany | 29a18dc | 2014-11-11 22:14:37 +0000 | [diff] [blame] | 31 | initializeSanitizerCoverageModulePass(Registry); |
Peter Collingbourne | e5d5b0c | 2013-08-07 22:47:18 +0000 | [diff] [blame] | 32 | initializeDataFlowSanitizerPass(Registry); |
Peter Collingbourne | 82437bf | 2015-06-15 21:07:11 +0000 | [diff] [blame^] | 33 | initializeSafeStackPass(Registry); |
Owen Anderson | 9786868 | 2010-10-07 20:17:24 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | /// LLVMInitializeInstrumentation - C binding for |
| 37 | /// initializeInstrumentation. |
| 38 | void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) { |
| 39 | initializeInstrumentation(*unwrap(R)); |
| 40 | } |