1*9880d681SAndroid Build Coastguard Worker //===-- BPFMCInstLower.h - Lower MachineInstr to MCInst ---------*- C++ -*-===// 2*9880d681SAndroid Build Coastguard Worker // 3*9880d681SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker // 5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker // 8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_BPF_BPFMCINSTLOWER_H 11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_BPF_BPFMCINSTLOWER_H 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker #include "llvm/Support/Compiler.h" 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker namespace llvm { 16*9880d681SAndroid Build Coastguard Worker class AsmPrinter; 17*9880d681SAndroid Build Coastguard Worker class MCContext; 18*9880d681SAndroid Build Coastguard Worker class MCInst; 19*9880d681SAndroid Build Coastguard Worker class MCOperand; 20*9880d681SAndroid Build Coastguard Worker class MCSymbol; 21*9880d681SAndroid Build Coastguard Worker class MachineInstr; 22*9880d681SAndroid Build Coastguard Worker class MachineModuleInfoMachO; 23*9880d681SAndroid Build Coastguard Worker class MachineOperand; 24*9880d681SAndroid Build Coastguard Worker class Mangler; 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker // BPFMCInstLower - This class is used to lower an MachineInstr into an MCInst. 27*9880d681SAndroid Build Coastguard Worker class LLVM_LIBRARY_VISIBILITY BPFMCInstLower { 28*9880d681SAndroid Build Coastguard Worker MCContext &Ctx; 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker AsmPrinter &Printer; 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker public: BPFMCInstLower(MCContext & ctx,AsmPrinter & printer)33*9880d681SAndroid Build Coastguard Worker BPFMCInstLower(MCContext &ctx, AsmPrinter &printer) 34*9880d681SAndroid Build Coastguard Worker : Ctx(ctx), Printer(printer) {} 35*9880d681SAndroid Build Coastguard Worker void Lower(const MachineInstr *MI, MCInst &OutMI) const; 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const; 40*9880d681SAndroid Build Coastguard Worker }; 41*9880d681SAndroid Build Coastguard Worker } 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker #endif 44