Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.8 KiB

  1. //===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
  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 constructor functions for instrumentation passes.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
  14. #define LLVM_TRANSFORMS_INSTRUMENTATION_H
  15. #include "llvm/ADT/StringRef.h"
  16. namespace llvm {
  17. class ModulePass;
  18. class FunctionPass;
  19. // Insert edge profiling instrumentation
  20. ModulePass *createEdgeProfilerPass();
  21. // Insert optimal edge profiling instrumentation
  22. ModulePass *createOptimalEdgeProfilerPass();
  23. // Insert path profiling instrumentation
  24. ModulePass *createPathProfilerPass();
  25. // Insert GCOV profiling instrumentation
  26. struct GCOVOptions {
  27. static GCOVOptions getDefault();
  28. // Specify whether to emit .gcno files.
  29. bool EmitNotes;
  30. // Specify whether to modify the program to emit .gcda files when run.
  31. bool EmitData;
  32. // A four-byte version string. The meaning of a version string is described in
  33. // gcc's gcov-io.h
  34. char Version[4];
  35. // Emit a "cfg checksum" that follows the "line number checksum" of a
  36. // function. This affects both .gcno and .gcda files.
  37. bool UseCfgChecksum;
  38. // Add the 'noredzone' attribute to added runtime library calls.
  39. bool NoRedZone;
  40. // Emit the name of the function in the .gcda files. This is redundant, as
  41. // the function identifier can be used to find the name from the .gcno file.
  42. bool FunctionNamesInData;
  43. };
  44. ModulePass *createGCOVProfilerPass(const GCOVOptions &Options =
  45. GCOVOptions::getDefault());
  46. // Insert AddressSanitizer (address sanity checking) instrumentation
  47. FunctionPass *createAddressSanitizerFunctionPass(
  48. bool CheckInitOrder = true, bool CheckUseAfterReturn = false,
  49. bool CheckLifetime = false, StringRef BlacklistFile = StringRef(),
  50. bool ZeroBaseShadow = false);
  51. ModulePass *createAddressSanitizerModulePass(
  52. bool CheckInitOrder = true, StringRef BlacklistFile = StringRef(),
  53. bool ZeroBaseShadow = false);
  54. // Insert MemorySanitizer instrumentation (detection of uninitialized reads)
  55. FunctionPass *createMemorySanitizerPass(bool TrackOrigins = false,
  56. StringRef BlacklistFile = StringRef());
  57. // Insert ThreadSanitizer (race detection) instrumentation
  58. FunctionPass *createThreadSanitizerPass(StringRef BlacklistFile = StringRef());
  59. // BoundsChecking - This pass instruments the code to perform run-time bounds
  60. // checking on loads, stores, and other memory intrinsics.
  61. FunctionPass *createBoundsCheckingPass();
  62. } // End llvm namespace
  63. #endif