forked from OSchip/llvm-project
[WebAssembly] Use the checked form of MachineFunction::getSubtarget. NFC.
llvm-svn: 245852
This commit is contained in:
parent
08fc966d3c
commit
e419a7c307
|
@ -58,8 +58,7 @@ private:
|
|||
}
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
TII = static_cast<const WebAssemblyInstrInfo *>(
|
||||
MF.getSubtarget().getInstrInfo());
|
||||
TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
|
||||
return AsmPrinter::runOnMachineFunction(MF);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ using namespace llvm;
|
|||
/// register.
|
||||
bool WebAssemblyFrameLowering::hasFP(const MachineFunction &MF) const {
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const auto *RegInfo = static_cast<const WebAssemblyRegisterInfo *>(
|
||||
MF.getSubtarget().getRegisterInfo());
|
||||
const auto *RegInfo =
|
||||
MF.getSubtarget<WebAssemblySubtarget>().getRegisterInfo();
|
||||
return MFI->hasCalls() || MFI->hasVarSizedObjects() ||
|
||||
MFI->isFrameAddressTaken() || MFI->hasStackMap() ||
|
||||
MFI->hasPatchPoint() || RegInfo->needsStackRealignment(MF);
|
||||
|
|
Loading…
Reference in New Issue