mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1a34c83caf
commit
7648bd428b
@ -28,14 +28,12 @@
|
||||
#include "llvm/Type.h"
|
||||
using namespace llvm;
|
||||
|
||||
|
||||
const X86Subtarget &X86MCInstLower::getSubtarget() const {
|
||||
return AsmPrinter.getSubtarget();
|
||||
}
|
||||
X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang,
|
||||
X86AsmPrinter &asmprinter)
|
||||
: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MMI(AsmPrinter.MMI) {}
|
||||
|
||||
MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const {
|
||||
assert(getSubtarget().isTargetDarwin() &&"Can only get MachO info on darwin");
|
||||
return AsmPrinter.MMI->getObjFileInfo<MachineModuleInfoMachO>();
|
||||
return MMI->getObjFileInfo<MachineModuleInfoMachO>();
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +88,7 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
|
||||
assert(MO.isGlobal() && "Extern symbol not handled yet");
|
||||
StubSym =
|
||||
MachineModuleInfoImpl::
|
||||
StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()),
|
||||
StubValueTy(Mang->getSymbol(MO.getGlobal()),
|
||||
!MO.getGlobal()->hasInternalLinkage());
|
||||
}
|
||||
return Sym;
|
||||
@ -104,7 +102,7 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
|
||||
assert(MO.isGlobal() && "Extern symbol not handled yet");
|
||||
StubSym =
|
||||
MachineModuleInfoImpl::
|
||||
StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()),
|
||||
StubValueTy(Mang->getSymbol(MO.getGlobal()),
|
||||
!MO.getGlobal()->hasInternalLinkage());
|
||||
}
|
||||
return Sym;
|
||||
@ -120,7 +118,7 @@ GetSymbolFromOperand(const MachineOperand &MO) const {
|
||||
if (MO.isGlobal()) {
|
||||
StubSym =
|
||||
MachineModuleInfoImpl::
|
||||
StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()),
|
||||
StubValueTy(Mang->getSymbol(MO.getGlobal()),
|
||||
!MO.getGlobal()->hasInternalLinkage());
|
||||
} else {
|
||||
Name.erase(Name.end()-5, Name.end());
|
||||
|
@ -18,22 +18,20 @@ namespace llvm {
|
||||
class MCOperand;
|
||||
class MCSymbol;
|
||||
class MachineInstr;
|
||||
class MachineModuleInfo;
|
||||
class MachineModuleInfoMachO;
|
||||
class MachineOperand;
|
||||
class Mangler;
|
||||
class X86AsmPrinter;
|
||||
class X86Subtarget;
|
||||
|
||||
/// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
|
||||
class LLVM_LIBRARY_VISIBILITY X86MCInstLower {
|
||||
MCContext &Ctx;
|
||||
Mangler *Mang;
|
||||
X86AsmPrinter &AsmPrinter;
|
||||
|
||||
const X86Subtarget &getSubtarget() const;
|
||||
MachineModuleInfo *MMI;
|
||||
public:
|
||||
X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter)
|
||||
: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {}
|
||||
X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter);
|
||||
|
||||
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user