1 //===------ JITDwarfEmitter.h - Write dwarf tables into memory ------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines a JITDwarfEmitter object that is used by the JIT to
11 // write dwarf tables to memory.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H
16 #define LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H
21 class MachineCodeEmitter;
22 class MachineFunction;
23 class MachineModuleInfo;
27 class TargetRegisterInfo;
29 class JITDwarfEmitter {
31 MachineCodeEmitter* MCE;
32 const TargetRegisterInfo* RI;
33 MachineModuleInfo* MMI;
35 bool needsIndirectEncoding;
36 bool stackGrowthDirection;
39 JITDwarfEmitter(JIT& jit);
41 unsigned char* EmitExceptionTable(MachineFunction* MF,
42 unsigned char* StartFunction,
43 unsigned char* EndFunction);
45 void EmitFrameMoves(intptr_t BaseLabelPtr,
46 const std::vector<MachineMove> &Moves);
48 unsigned char* EmitCommonEHFrame(const Function* Personality);
50 unsigned char* EmitEHFrame(const Function* Personality,
51 unsigned char* StartBufferPtr,
52 unsigned char* StartFunction,
53 unsigned char* EndFunction,
54 unsigned char* ExceptionTable);
57 unsigned char* EmitDwarfTable(MachineFunction& F,
58 MachineCodeEmitter& MCE,
59 unsigned char* StartFunction,
60 unsigned char* EndFunction);
62 void setModuleInfo(MachineModuleInfo* Info) {
67 } // end namespace llvm
69 #endif // LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H