mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
Save the MachineFunction in startFunction so that we can use it for
lookups of the subtarget later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b0c988b90
commit
b661ab1cbd
@ -57,6 +57,7 @@ class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
|
||||
void emitShadowPadding(MCStreamer &OutStreamer, const MCSubtargetInfo &STI);
|
||||
private:
|
||||
TargetMachine &TM;
|
||||
const MachineFunction *MF;
|
||||
std::unique_ptr<MCCodeEmitter> CodeEmitter;
|
||||
bool InShadow;
|
||||
|
||||
|
@ -74,10 +74,11 @@ namespace llvm {
|
||||
X86AsmPrinter::StackMapShadowTracker::~StackMapShadowTracker() {}
|
||||
|
||||
void
|
||||
X86AsmPrinter::StackMapShadowTracker::startFunction(MachineFunction &MF) {
|
||||
X86AsmPrinter::StackMapShadowTracker::startFunction(MachineFunction &F) {
|
||||
MF = &F;
|
||||
CodeEmitter.reset(TM.getTarget().createMCCodeEmitter(
|
||||
*MF.getSubtarget().getInstrInfo(), *MF.getSubtarget().getRegisterInfo(),
|
||||
MF.getSubtarget(), MF.getContext()));
|
||||
*MF->getSubtarget().getInstrInfo(), *MF->getSubtarget().getRegisterInfo(),
|
||||
MF->getSubtarget(), MF->getContext()));
|
||||
}
|
||||
|
||||
void X86AsmPrinter::StackMapShadowTracker::count(MCInst &Inst,
|
||||
@ -99,7 +100,7 @@ namespace llvm {
|
||||
if (InShadow && CurrentShadowSize < RequiredShadowSize) {
|
||||
InShadow = false;
|
||||
EmitNops(OutStreamer, RequiredShadowSize - CurrentShadowSize,
|
||||
TM.getSubtarget<X86Subtarget>().is64Bit(), STI);
|
||||
MF->getSubtarget<X86Subtarget>().is64Bit(), STI);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user