Instrumentation.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #include "llvm/InitializePasses.h"
  15. #include "llvm-c/Initialization.h"
  16. #include "llvm/PassRegistry.h"
  17. using namespace llvm;
  18. /// initializeInstrumentation - Initialize all passes in the TransformUtils
  19. /// library.
  20. void llvm::initializeInstrumentation(PassRegistry &Registry) {
  21. initializeAddressSanitizerPass(Registry);
  22. initializeAddressSanitizerModulePass(Registry);
  23. initializeBoundsCheckingPass(Registry);
  24. initializeGCOVProfilerPass(Registry);
  25. initializeInstrProfilingPass(Registry);
  26. initializeMemorySanitizerPass(Registry);
  27. initializeThreadSanitizerPass(Registry);
  28. initializeSanitizerCoverageModulePass(Registry);
  29. initializeDataFlowSanitizerPass(Registry);
  30. initializeSafeStackPass(Registry);
  31. }
  32. /// LLVMInitializeInstrumentation - C binding for
  33. /// initializeInstrumentation.
  34. void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) {
  35. initializeInstrumentation(*unwrap(R));
  36. }