git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245852
91177308-0d34-0410-b5e6-
96231b3b80d8
}
bool runOnMachineFunction(MachineFunction &MF) override {
- TII = static_cast<const WebAssemblyInstrInfo *>(
- MF.getSubtarget().getInstrInfo());
+ TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
return AsmPrinter::runOnMachineFunction(MF);
}
/// 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);