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
18 #include "llvm/Support/DataTypes.h"
26 class MachineFunction;
27 class MachineModuleInfo;
32 class TargetRegisterInfo;
34 class JITDwarfEmitter {
37 const TargetRegisterInfo* RI;
39 MachineModuleInfo* MMI;
41 bool stackGrowthDirection;
43 unsigned char* EmitExceptionTable(MachineFunction* MF,
44 unsigned char* StartFunction,
45 unsigned char* EndFunction) const;
47 void EmitFrameMoves(intptr_t BaseLabelPtr,
48 const std::vector<MachineMove> &Moves) const;
50 unsigned char* EmitCommonEHFrame(const Function* Personality) const;
52 unsigned char* EmitEHFrame(const Function* Personality,
53 unsigned char* StartBufferPtr,
54 unsigned char* StartFunction,
55 unsigned char* EndFunction,
56 unsigned char* ExceptionTable) const;
60 JITDwarfEmitter(JIT& jit);
62 unsigned char* EmitDwarfTable(MachineFunction& F,
64 unsigned char* StartFunction,
65 unsigned char* EndFunction,
66 unsigned char* &EHFramePtr);
69 void setModuleInfo(MachineModuleInfo* Info) {
75 } // end namespace llvm
77 #endif // LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H