LLVM API Documentation

Instrumentation.cpp
Go to the documentation of this file.
00001 //===-- Instrumentation.cpp - TransformUtils Infrastructure ---------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file defines the common initialization infrastructure for the
00011 // Instrumentation library.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #include "llvm/InitializePasses.h"
00016 #include "llvm-c/Initialization.h"
00017 #include "llvm/PassRegistry.h"
00018 
00019 using namespace llvm;
00020 
00021 /// initializeInstrumentation - Initialize all passes in the TransformUtils
00022 /// library.
00023 void llvm::initializeInstrumentation(PassRegistry &Registry) {
00024   initializeAddressSanitizerPass(Registry);
00025   initializeAddressSanitizerModulePass(Registry);
00026   initializeBoundsCheckingPass(Registry);
00027   initializeGCOVProfilerPass(Registry);
00028   initializeMemorySanitizerPass(Registry);
00029   initializeThreadSanitizerPass(Registry);
00030   initializeDataFlowSanitizerPass(Registry);
00031 }
00032 
00033 /// LLVMInitializeInstrumentation - C binding for
00034 /// initializeInstrumentation.
00035 void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) {
00036   initializeInstrumentation(*unwrap(R));
00037 }