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.

63 lines
2.2 KiB

  1. //===-- AssemblyAnnotationWriter.h - Annotation .ll files -------*- 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. // Clients of the assembly writer can use this interface to add their own
  11. // special-purpose annotations to LLVM assembly language printouts. Note that
  12. // the assembly parser won't be able to parse these, in general, so
  13. // implementations are advised to print stuff as LLVM comments.
  14. //
  15. //===----------------------------------------------------------------------===//
  16. #ifndef LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
  17. #define LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
  18. namespace llvm {
  19. class Function;
  20. class BasicBlock;
  21. class Instruction;
  22. class Value;
  23. class formatted_raw_ostream;
  24. class AssemblyAnnotationWriter {
  25. public:
  26. virtual ~AssemblyAnnotationWriter();
  27. /// emitFunctionAnnot - This may be implemented to emit a string right before
  28. /// the start of a function.
  29. virtual void emitFunctionAnnot(const Function *,
  30. formatted_raw_ostream &) {}
  31. /// emitBasicBlockStartAnnot - This may be implemented to emit a string right
  32. /// after the basic block label, but before the first instruction in the
  33. /// block.
  34. virtual void emitBasicBlockStartAnnot(const BasicBlock *,
  35. formatted_raw_ostream &) {
  36. }
  37. /// emitBasicBlockEndAnnot - This may be implemented to emit a string right
  38. /// after the basic block.
  39. virtual void emitBasicBlockEndAnnot(const BasicBlock *,
  40. formatted_raw_ostream &) {
  41. }
  42. /// emitInstructionAnnot - This may be implemented to emit a string right
  43. /// before an instruction is emitted.
  44. virtual void emitInstructionAnnot(const Instruction *,
  45. formatted_raw_ostream &) {}
  46. /// printInfoComment - This may be implemented to emit a comment to the
  47. /// right of an instruction or global value.
  48. virtual void printInfoComment(const Value &, formatted_raw_ostream &) {}
  49. };
  50. } // End llvm namespace
  51. #endif