Home | History | Annotate | Download | only in CodeGen
      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 
     17 #ifndef EE_MACHINE_CODE_INFO_H
     18 #define EE_MACHINE_CODE_INFO_H
     19 
     20 #include "llvm/Support/DataTypes.h"
     21 
     22 namespace llvm {
     23 
     24 class MachineCodeInfo {
     25 private:
     26   size_t Size;   // Number of bytes in memory used
     27   void *Address; // The address of the function in memory
     28 
     29 public:
     30   MachineCodeInfo() : Size(0), Address(0) {}
     31 
     32   void setSize(size_t s) {
     33     Size = s;
     34   }
     35 
     36   void setAddress(void *a) {
     37     Address = a;
     38   }
     39 
     40   size_t size() const {
     41     return Size;
     42   }
     43 
     44   void *address() const {
     45     return Address;
     46   }
     47 
     48 };
     49 
     50 }
     51 
     52 #endif
     53 
     54