annotate lib/Target/ARC/ARCMCInstLower.h @ 129:9ec641e857f8

Fix compile error to update llvm 5.0
author mir3636
date Tue, 12 Dec 2017 19:42:58 +0900
parents 803732b1fca8
children c2174574ed3a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 //===- ARCMCInstLower.h - Lower MachineInstr to MCInst ----------*- C++ -*-===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 #ifndef LLVM_LIB_TARGET_ARC_ARCMCINSTLOWER_H
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 #define LLVM_LIB_TARGET_ARC_ARCMCINSTLOWER_H
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 #include "llvm/CodeGen/MachineOperand.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 #include "llvm/Support/Compiler.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 namespace llvm {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 class MCContext;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 class MCInst;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 class MCOperand;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 class MachineInstr;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 class MachineFunction;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 class Mangler;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 class AsmPrinter;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 /// \brief This class is used to lower an MachineInstr into an MCInst.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 class LLVM_LIBRARY_VISIBILITY ARCMCInstLower {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 using MachineOperandType = MachineOperand::MachineOperandType;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 MCContext *Ctx;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 AsmPrinter &Printer;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 public:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 ARCMCInstLower(MCContext *C, AsmPrinter &asmprinter);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 MCOperand LowerOperand(const MachineOperand &MO, unsigned offset = 0) const;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 private:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 MCOperand LowerSymbolOperand(const MachineOperand &MO,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 MachineOperandType MOTy, unsigned Offset) const;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 } // end namespace llvm
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 #endif // LLVM_LIB_TARGET_ARC_ARCMCINSTLOWER_H