Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //===-- llvm/CodeGen/MachineCodeEmitter.h - Code emission -------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 84e66db | 2007-12-29 19:59:42 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines an abstract interface that is used by the machine code |
| 11 | // emission framework to output the code. This allows machine code emission to |
| 12 | // be separated from concerns such as resolution of call targets, and where the |
| 13 | // machine code will be written (memory or disk, f.e.). |
| 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
| 17 | #ifndef LLVM_CODEGEN_MACHINECODEEMITTER_H |
| 18 | #define LLVM_CODEGEN_MACHINECODEEMITTER_H |
| 19 | |
| 20 | #include "llvm/Support/DataTypes.h" |
Jeffrey Yasskin | 8ad296e | 2009-07-16 21:07:26 +0000 | [diff] [blame^] | 21 | #include "llvm/Support/DebugLoc.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 22 | |
| 23 | namespace llvm { |
| 24 | |
| 25 | class MachineBasicBlock; |
| 26 | class MachineConstantPool; |
| 27 | class MachineJumpTableInfo; |
| 28 | class MachineFunction; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 29 | class MachineModuleInfo; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 30 | class MachineRelocation; |
| 31 | class Value; |
| 32 | class GlobalValue; |
| 33 | class Function; |
| 34 | |
| 35 | /// MachineCodeEmitter - This class defines two sorts of methods: those for |
| 36 | /// emitting the actual bytes of machine code, and those for emitting auxillary |
| 37 | /// structures, such as jump tables, relocations, etc. |
| 38 | /// |
| 39 | /// Emission of machine code is complicated by the fact that we don't (in |
| 40 | /// general) know the size of the machine code that we're about to emit before |
| 41 | /// we emit it. As such, we preallocate a certain amount of memory, and set the |
| 42 | /// BufferBegin/BufferEnd pointers to the start and end of the buffer. As we |
| 43 | /// emit machine instructions, we advance the CurBufferPtr to indicate the |
| 44 | /// location of the next byte to emit. In the case of a buffer overflow (we |
| 45 | /// need to emit more machine code than we have allocated space for), the |
| 46 | /// CurBufferPtr will saturate to BufferEnd and ignore stores. Once the entire |
| 47 | /// function has been emitted, the overflow condition is checked, and if it has |
| 48 | /// occurred, more memory is allocated, and we reemit the code into it. |
| 49 | /// |
| 50 | class MachineCodeEmitter { |
| 51 | protected: |
| 52 | /// BufferBegin/BufferEnd - Pointers to the start and end of the memory |
| 53 | /// allocated for this code buffer. |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 54 | uint8_t *BufferBegin, *BufferEnd; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 55 | |
| 56 | /// CurBufferPtr - Pointer to the next byte of memory to fill when emitting |
| 57 | /// code. This is guranteed to be in the range [BufferBegin,BufferEnd]. If |
| 58 | /// this pointer is at BufferEnd, it will never move due to code emission, and |
| 59 | /// all code emission requests will be ignored (this is the buffer overflow |
| 60 | /// condition). |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 61 | uint8_t *CurBufferPtr; |
Evan Cheng | af74325 | 2008-01-05 02:26:58 +0000 | [diff] [blame] | 62 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 63 | public: |
| 64 | virtual ~MachineCodeEmitter() {} |
| 65 | |
| 66 | /// startFunction - This callback is invoked when the specified function is |
| 67 | /// about to be code generated. This initializes the BufferBegin/End/Ptr |
| 68 | /// fields. |
| 69 | /// |
| 70 | virtual void startFunction(MachineFunction &F) = 0; |
| 71 | |
| 72 | /// finishFunction - This callback is invoked when the specified function has |
| 73 | /// finished code generation. If a buffer overflow has occurred, this method |
| 74 | /// returns true (the callee is required to try again), otherwise it returns |
| 75 | /// false. |
| 76 | /// |
| 77 | virtual bool finishFunction(MachineFunction &F) = 0; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 78 | |
| 79 | /// emitByte - This callback is invoked when a byte needs to be written to the |
| 80 | /// output stream. |
| 81 | /// |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 82 | void emitByte(uint8_t B) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 83 | if (CurBufferPtr != BufferEnd) |
| 84 | *CurBufferPtr++ = B; |
| 85 | } |
| 86 | |
| 87 | /// emitWordLE - This callback is invoked when a 32-bit word needs to be |
| 88 | /// written to the output stream in little-endian format. |
| 89 | /// |
Bruno Cardoso Lopes | d6ba509 | 2009-06-12 23:51:56 +0000 | [diff] [blame] | 90 | void emitWordLE(uint32_t W) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 91 | if (4 <= BufferEnd-CurBufferPtr) { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 92 | *CurBufferPtr++ = (uint8_t)(W >> 0); |
| 93 | *CurBufferPtr++ = (uint8_t)(W >> 8); |
| 94 | *CurBufferPtr++ = (uint8_t)(W >> 16); |
| 95 | *CurBufferPtr++ = (uint8_t)(W >> 24); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 96 | } else { |
| 97 | CurBufferPtr = BufferEnd; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | /// emitWordBE - This callback is invoked when a 32-bit word needs to be |
| 102 | /// written to the output stream in big-endian format. |
| 103 | /// |
Bruno Cardoso Lopes | d6ba509 | 2009-06-12 23:51:56 +0000 | [diff] [blame] | 104 | void emitWordBE(uint32_t W) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 105 | if (4 <= BufferEnd-CurBufferPtr) { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 106 | *CurBufferPtr++ = (uint8_t)(W >> 24); |
| 107 | *CurBufferPtr++ = (uint8_t)(W >> 16); |
| 108 | *CurBufferPtr++ = (uint8_t)(W >> 8); |
| 109 | *CurBufferPtr++ = (uint8_t)(W >> 0); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 110 | } else { |
| 111 | CurBufferPtr = BufferEnd; |
| 112 | } |
| 113 | } |
| 114 | |
Dan Gohman | 5ad0947 | 2008-10-24 01:57:54 +0000 | [diff] [blame] | 115 | /// emitDWordLE - This callback is invoked when a 64-bit word needs to be |
| 116 | /// written to the output stream in little-endian format. |
| 117 | /// |
| 118 | void emitDWordLE(uint64_t W) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 119 | if (8 <= BufferEnd-CurBufferPtr) { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 120 | *CurBufferPtr++ = (uint8_t)(W >> 0); |
| 121 | *CurBufferPtr++ = (uint8_t)(W >> 8); |
| 122 | *CurBufferPtr++ = (uint8_t)(W >> 16); |
| 123 | *CurBufferPtr++ = (uint8_t)(W >> 24); |
| 124 | *CurBufferPtr++ = (uint8_t)(W >> 32); |
| 125 | *CurBufferPtr++ = (uint8_t)(W >> 40); |
| 126 | *CurBufferPtr++ = (uint8_t)(W >> 48); |
| 127 | *CurBufferPtr++ = (uint8_t)(W >> 56); |
Dan Gohman | 5ad0947 | 2008-10-24 01:57:54 +0000 | [diff] [blame] | 128 | } else { |
| 129 | CurBufferPtr = BufferEnd; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | /// emitDWordBE - This callback is invoked when a 64-bit word needs to be |
| 134 | /// written to the output stream in big-endian format. |
| 135 | /// |
| 136 | void emitDWordBE(uint64_t W) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 137 | if (8 <= BufferEnd-CurBufferPtr) { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 138 | *CurBufferPtr++ = (uint8_t)(W >> 56); |
| 139 | *CurBufferPtr++ = (uint8_t)(W >> 48); |
| 140 | *CurBufferPtr++ = (uint8_t)(W >> 40); |
| 141 | *CurBufferPtr++ = (uint8_t)(W >> 32); |
| 142 | *CurBufferPtr++ = (uint8_t)(W >> 24); |
| 143 | *CurBufferPtr++ = (uint8_t)(W >> 16); |
| 144 | *CurBufferPtr++ = (uint8_t)(W >> 8); |
| 145 | *CurBufferPtr++ = (uint8_t)(W >> 0); |
Dan Gohman | 5ad0947 | 2008-10-24 01:57:54 +0000 | [diff] [blame] | 146 | } else { |
| 147 | CurBufferPtr = BufferEnd; |
| 148 | } |
| 149 | } |
| 150 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 151 | /// emitAlignment - Move the CurBufferPtr pointer up the the specified |
| 152 | /// alignment (saturated to BufferEnd of course). |
| 153 | void emitAlignment(unsigned Alignment) { |
| 154 | if (Alignment == 0) Alignment = 1; |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 155 | |
| 156 | if(Alignment <= (uintptr_t)(BufferEnd-CurBufferPtr)) { |
| 157 | // Move the current buffer ptr up to the specified alignment. |
| 158 | CurBufferPtr = |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 159 | (uint8_t*)(((uintptr_t)CurBufferPtr+Alignment-1) & |
| 160 | ~(uintptr_t)(Alignment-1)); |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 161 | } else { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 162 | CurBufferPtr = BufferEnd; |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 163 | } |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 164 | } |
| 165 | |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 166 | |
| 167 | /// emitULEB128Bytes - This callback is invoked when a ULEB128 needs to be |
| 168 | /// written to the output stream. |
Bruno Cardoso Lopes | d6ba509 | 2009-06-12 23:51:56 +0000 | [diff] [blame] | 169 | void emitULEB128Bytes(uint64_t Value) { |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 170 | do { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 171 | uint8_t Byte = Value & 0x7f; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 172 | Value >>= 7; |
| 173 | if (Value) Byte |= 0x80; |
| 174 | emitByte(Byte); |
| 175 | } while (Value); |
| 176 | } |
| 177 | |
| 178 | /// emitSLEB128Bytes - This callback is invoked when a SLEB128 needs to be |
| 179 | /// written to the output stream. |
Bruno Cardoso Lopes | d6ba509 | 2009-06-12 23:51:56 +0000 | [diff] [blame] | 180 | void emitSLEB128Bytes(uint64_t Value) { |
| 181 | uint64_t Sign = Value >> (8 * sizeof(Value) - 1); |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 182 | bool IsMore; |
| 183 | |
| 184 | do { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 185 | uint8_t Byte = Value & 0x7f; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 186 | Value >>= 7; |
| 187 | IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0; |
| 188 | if (IsMore) Byte |= 0x80; |
| 189 | emitByte(Byte); |
| 190 | } while (IsMore); |
| 191 | } |
| 192 | |
| 193 | /// emitString - This callback is invoked when a String needs to be |
| 194 | /// written to the output stream. |
| 195 | void emitString(const std::string &String) { |
Evan Cheng | 591bfc8 | 2008-05-05 18:30:58 +0000 | [diff] [blame] | 196 | for (unsigned i = 0, N = static_cast<unsigned>(String.size()); |
| 197 | i < N; ++i) { |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 198 | uint8_t C = String[i]; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 199 | emitByte(C); |
| 200 | } |
| 201 | emitByte(0); |
| 202 | } |
| 203 | |
| 204 | /// emitInt32 - Emit a int32 directive. |
Bruno Cardoso Lopes | 214ae97 | 2009-06-04 00:15:51 +0000 | [diff] [blame] | 205 | void emitInt32(int32_t Value) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 206 | if (4 <= BufferEnd-CurBufferPtr) { |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 207 | *((uint32_t*)CurBufferPtr) = Value; |
| 208 | CurBufferPtr += 4; |
| 209 | } else { |
| 210 | CurBufferPtr = BufferEnd; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /// emitInt64 - Emit a int64 directive. |
| 215 | void emitInt64(uint64_t Value) { |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 216 | if (8 <= BufferEnd-CurBufferPtr) { |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 217 | *((uint64_t*)CurBufferPtr) = Value; |
| 218 | CurBufferPtr += 8; |
| 219 | } else { |
| 220 | CurBufferPtr = BufferEnd; |
| 221 | } |
| 222 | } |
| 223 | |
Nicolas Geoffray | 3092019 | 2008-11-18 10:44:46 +0000 | [diff] [blame] | 224 | /// emitInt32At - Emit the Int32 Value in Addr. |
| 225 | void emitInt32At(uintptr_t *Addr, uintptr_t Value) { |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 226 | if (Addr >= (uintptr_t*)BufferBegin && Addr < (uintptr_t*)BufferEnd) |
Nicolas Geoffray | 3092019 | 2008-11-18 10:44:46 +0000 | [diff] [blame] | 227 | (*(uint32_t*)Addr) = (uint32_t)Value; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 228 | } |
| 229 | |
Nicolas Geoffray | 3092019 | 2008-11-18 10:44:46 +0000 | [diff] [blame] | 230 | /// emitInt64At - Emit the Int64 Value in Addr. |
| 231 | void emitInt64At(uintptr_t *Addr, uintptr_t Value) { |
| 232 | if (Addr >= (uintptr_t*)BufferBegin && Addr < (uintptr_t*)BufferEnd) |
| 233 | (*(uint64_t*)Addr) = (uint64_t)Value; |
| 234 | } |
| 235 | |
Jeffrey Yasskin | 8ad296e | 2009-07-16 21:07:26 +0000 | [diff] [blame^] | 236 | /// processDebugLoc - Records debug location information about a |
| 237 | /// MachineInstruction. This is called before emitting any bytes associated |
| 238 | /// with the instruction. Even if successive instructions have the same debug |
| 239 | /// location, this method will be called for each one. |
| 240 | virtual void processDebugLoc(DebugLoc DL) {} |
| 241 | |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 242 | /// emitLabel - Emits a label |
| 243 | virtual void emitLabel(uint64_t LabelID) = 0; |
| 244 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 245 | /// allocateSpace - Allocate a block of space in the current output buffer, |
| 246 | /// returning null (and setting conditions to indicate buffer overflow) on |
| 247 | /// failure. Alignment is the alignment in bytes of the buffer desired. |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 248 | virtual void *allocateSpace(uintptr_t Size, unsigned Alignment) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 249 | emitAlignment(Alignment); |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 250 | void *Result; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 251 | |
| 252 | // Check for buffer overflow. |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 253 | if (Size >= (uintptr_t)(BufferEnd-CurBufferPtr)) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 254 | CurBufferPtr = BufferEnd; |
| 255 | Result = 0; |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 256 | } else { |
| 257 | // Allocate the space. |
| 258 | Result = CurBufferPtr; |
| 259 | CurBufferPtr += Size; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 260 | } |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 261 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 262 | return Result; |
| 263 | } |
| 264 | |
| 265 | /// StartMachineBasicBlock - This should be called by the target when a new |
| 266 | /// basic block is about to be emitted. This way the MCE knows where the |
| 267 | /// start of the block is, and can implement getMachineBasicBlockAddress. |
| 268 | virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0; |
| 269 | |
| 270 | /// getCurrentPCValue - This returns the address that the next emitted byte |
| 271 | /// will be output to. |
| 272 | /// |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 273 | virtual uintptr_t getCurrentPCValue() const { |
| 274 | return (uintptr_t)CurBufferPtr; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 275 | } |
| 276 | |
| 277 | /// getCurrentPCOffset - Return the offset from the start of the emitted |
| 278 | /// buffer that we are currently writing to. |
Bruno Cardoso Lopes | aabb9a5 | 2009-07-06 05:09:34 +0000 | [diff] [blame] | 279 | virtual uintptr_t getCurrentPCOffset() const { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 280 | return CurBufferPtr-BufferBegin; |
| 281 | } |
| 282 | |
| 283 | /// addRelocation - Whenever a relocatable address is needed, it should be |
| 284 | /// noted with this interface. |
| 285 | virtual void addRelocation(const MachineRelocation &MR) = 0; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 286 | |
| 287 | /// FIXME: These should all be handled with relocations! |
| 288 | |
| 289 | /// getConstantPoolEntryAddress - Return the address of the 'Index' entry in |
| 290 | /// the constant pool that was last emitted with the emitConstantPool method. |
| 291 | /// |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 292 | virtual uintptr_t getConstantPoolEntryAddress(unsigned Index) const = 0; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 293 | |
| 294 | /// getJumpTableEntryAddress - Return the address of the jump table with index |
| 295 | /// 'Index' in the function that last called initJumpTableInfo. |
| 296 | /// |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 297 | virtual uintptr_t getJumpTableEntryAddress(unsigned Index) const = 0; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 298 | |
| 299 | /// getMachineBasicBlockAddress - Return the address of the specified |
| 300 | /// MachineBasicBlock, only usable after the label for the MBB has been |
| 301 | /// emitted. |
| 302 | /// |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 303 | virtual uintptr_t getMachineBasicBlockAddress(MachineBasicBlock *MBB) const= 0; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 304 | |
| 305 | /// getLabelAddress - Return the address of the specified LabelID, only usable |
| 306 | /// after the LabelID has been emitted. |
| 307 | /// |
Evan Cheng | 6e561c7 | 2008-12-10 02:32:19 +0000 | [diff] [blame] | 308 | virtual uintptr_t getLabelAddress(uint64_t LabelID) const = 0; |
Nicolas Geoffray | 0e757e1 | 2008-02-13 18:39:37 +0000 | [diff] [blame] | 309 | |
| 310 | /// Specifies the MachineModuleInfo object. This is used for exception handling |
| 311 | /// purposes. |
| 312 | virtual void setModuleInfo(MachineModuleInfo* Info) = 0; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 313 | }; |
| 314 | |
| 315 | } // End llvm namespace |
| 316 | |
| 317 | #endif |