1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[WebAssembly] Use the checked form of MachineFunction::getSubtarget. NFC.

llvm-svn: 245852
This commit is contained in:
Dan Gohman 2015-08-24 16:46:31 +00:00
parent 8c96f82ac6
commit 18755aab78
2 changed files with 3 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);