Silence -Wunused-variable in release builds.
[llvm/stm8.git] / lib / ExecutionEngine / JIT / JITDwarfEmitter.h
blobe1d00454d8d2bb96c315e1866adff808836328ca
1 //===------ JITDwarfEmitter.h - Write dwarf tables into memory ------------===//
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 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 namespace llvm {
20 class Function;
21 class JITCodeEmitter;
22 class MachineFunction;
23 class MachineModuleInfo;
24 class MachineMove;
25 class TargetData;
26 class TargetFrameLowering;
27 class TargetMachine;
28 class TargetRegisterInfo;
30 class JITDwarfEmitter {
31 const TargetData* TD;
32 JITCodeEmitter* JCE;
33 const TargetRegisterInfo* RI;
34 const TargetFrameLowering *TFI;
35 MachineModuleInfo* MMI;
36 JIT& Jit;
37 bool stackGrowthDirection;
39 unsigned char* EmitExceptionTable(MachineFunction* MF,
40 unsigned char* StartFunction,
41 unsigned char* EndFunction) const;
43 void EmitFrameMoves(intptr_t BaseLabelPtr,
44 const std::vector<MachineMove> &Moves) const;
46 unsigned char* EmitCommonEHFrame(const Function* Personality) const;
48 unsigned char* EmitEHFrame(const Function* Personality,
49 unsigned char* StartBufferPtr,
50 unsigned char* StartFunction,
51 unsigned char* EndFunction,
52 unsigned char* ExceptionTable) const;
54 public:
56 JITDwarfEmitter(JIT& jit);
58 unsigned char* EmitDwarfTable(MachineFunction& F,
59 JITCodeEmitter& JCE,
60 unsigned char* StartFunction,
61 unsigned char* EndFunction,
62 unsigned char* &EHFramePtr);
65 void setModuleInfo(MachineModuleInfo* Info) {
66 MMI = Info;
71 } // end namespace llvm
73 #endif // LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H