OLD | NEW |
1 //===-- llvm/MC/MCAsmBackend.h - MC Asm Backend -----------------*- C++ -*-===// | 1 //===-- llvm/MC/MCAsmBackend.h - MC Asm Backend -----------------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 | 9 |
10 #ifndef LLVM_MC_MCASMBACKEND_H | 10 #ifndef LLVM_MC_MCASMBACKEND_H |
11 #define LLVM_MC_MCASMBACKEND_H | 11 #define LLVM_MC_MCASMBACKEND_H |
12 | 12 |
13 #include "llvm/ADT/ArrayRef.h" | 13 #include "llvm/ADT/ArrayRef.h" |
14 #include "llvm/MC/MCDirectives.h" | 14 #include "llvm/MC/MCDirectives.h" |
15 #include "llvm/MC/MCDwarf.h" | 15 #include "llvm/MC/MCDwarf.h" |
16 #include "llvm/MC/MCFixup.h" | 16 #include "llvm/MC/MCFixup.h" |
17 #include "llvm/Support/DataTypes.h" | 17 #include "llvm/Support/DataTypes.h" |
18 #include "llvm/Support/ErrorHandling.h" | 18 #include "llvm/Support/ErrorHandling.h" |
19 | 19 |
20 namespace llvm { | 20 namespace llvm { |
21 class MCAsmLayout; | 21 class MCAsmLayout; |
22 class MCAssembler; | 22 class MCAssembler; |
23 class MCELFObjectTargetWriter; | 23 class MCELFObjectTargetWriter; |
24 struct MCFixupKindInfo; | 24 struct MCFixupKindInfo; |
25 class MCFragment; | 25 class MCFragment; |
26 class MCInst; | 26 class MCInst; |
27 class MCRelaxableFragment; | 27 class MCRelaxableFragment; |
28 class MCObjectWriter; | 28 class MCObjectWriter; |
29 class MCSection; | 29 class MCSection; |
| 30 class MCStreamer; |
30 class MCValue; | 31 class MCValue; |
31 class raw_ostream; | 32 class raw_ostream; |
32 | 33 |
33 /// MCAsmBackend - Generic interface to target specific assembler backends. | 34 /// MCAsmBackend - Generic interface to target specific assembler backends. |
34 class MCAsmBackend { | 35 class MCAsmBackend { |
35 MCAsmBackend(const MCAsmBackend &) LLVM_DELETED_FUNCTION; | 36 MCAsmBackend(const MCAsmBackend &) LLVM_DELETED_FUNCTION; |
36 void operator=(const MCAsmBackend &) LLVM_DELETED_FUNCTION; | 37 void operator=(const MCAsmBackend &) LLVM_DELETED_FUNCTION; |
37 | 38 |
38 protected: // Can only create subclasses. | 39 protected: // Can only create subclasses. |
39 MCAsmBackend(); | 40 MCAsmBackend(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 143 |
143 /// handleAssemblerFlag - Handle any target-specific assembler flags. | 144 /// handleAssemblerFlag - Handle any target-specific assembler flags. |
144 /// By default, do nothing. | 145 /// By default, do nothing. |
145 virtual void handleAssemblerFlag(MCAssemblerFlag Flag) {} | 146 virtual void handleAssemblerFlag(MCAssemblerFlag Flag) {} |
146 | 147 |
147 /// \brief Generate the compact unwind encoding for the CFI instructions. | 148 /// \brief Generate the compact unwind encoding for the CFI instructions. |
148 virtual uint32_t | 149 virtual uint32_t |
149 generateCompactUnwindEncoding(ArrayRef<MCCFIInstruction>) const { | 150 generateCompactUnwindEncoding(ArrayRef<MCCFIInstruction>) const { |
150 return 0; | 151 return 0; |
151 } | 152 } |
| 153 |
| 154 // @LOCALMOD-BEGIN |
| 155 /// CustomExpandInst - |
| 156 /// If the MCInst instruction has a custom expansion, write it to the |
| 157 /// MCStreamer 'Out'. This can be used to perform "last minute" rewrites of |
| 158 /// MCInst instructions for emission. |
| 159 virtual bool CustomExpandInst(const MCInst &Inst, MCStreamer &Out) { |
| 160 return false; |
| 161 } |
| 162 // @LOCALMOD-END |
152 }; | 163 }; |
153 | 164 |
154 } // End llvm namespace | 165 } // End llvm namespace |
155 | 166 |
156 #endif | 167 #endif |
OLD | NEW |