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.

53 lines
1.1 KiB

  1. //===-- MachineCodeInfo.h - Class used to report JIT info -------*- 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 MachineCodeInfo, a class used by the JIT ExecutionEngine
  11. // to report information about the generated machine code.
  12. //
  13. // See JIT::runJITOnFunction for usage.
  14. //
  15. //===----------------------------------------------------------------------===//
  16. #ifndef LLVM_CODEGEN_MACHINECODEINFO_H
  17. #define LLVM_CODEGEN_MACHINECODEINFO_H
  18. #include "llvm/Support/DataTypes.h"
  19. namespace llvm {
  20. class MachineCodeInfo {
  21. private:
  22. size_t Size; // Number of bytes in memory used
  23. void *Address; // The address of the function in memory
  24. public:
  25. MachineCodeInfo() : Size(0), Address(0) {}
  26. void setSize(size_t s) {
  27. Size = s;
  28. }
  29. void setAddress(void *a) {
  30. Address = a;
  31. }
  32. size_t size() const {
  33. return Size;
  34. }
  35. void *address() const {
  36. return Address;
  37. }
  38. };
  39. }
  40. #endif