summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineCodeInfo.h
blob: a75c02a052e78892e0bb455862b9ea11f19e972d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//===-- MachineCodeInfo.h - Class used to report JIT info -------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines MachineCodeInfo, a class used by the JIT ExecutionEngine
// to report information about the generated machine code.
//
// See JIT::runJITOnFunction for usage.
//
//===----------------------------------------------------------------------===//

#ifndef EE_MACHINE_CODE_INFO_H
#define EE_MACHINE_CODE_INFO_H

#include "llvm/System/DataTypes.h"

namespace llvm {

class MachineCodeInfo {
private:
  size_t Size;   // Number of bytes in memory used
  void *Address; // The address of the function in memory

public:
  MachineCodeInfo() : Size(0), Address(0) {}

  void setSize(size_t s) {
    Size = s;
  }

  void setAddress(void *a) {
    Address = a;
  }

  size_t size() const {
    return Size;
  }

  void *address() const {
    return Address;
  }

};

}

#endif