Skip to content

Commit

Permalink
[WebAssembly] Use the checked form of MachineFunction::getSubtarget. …
Browse files Browse the repository at this point in the history
…NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245852 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Dan Gohman committed Aug 24, 2015
1 parent c26771d commit c723870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class WebAssemblyAsmPrinter final : public AsmPrinter {
}

bool runOnMachineFunction(MachineFunction &MF) override {
TII = static_cast<const WebAssemblyInstrInfo *>(
MF.getSubtarget().getInstrInfo());
TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
return AsmPrinter::runOnMachineFunction(MF);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c723870

Please sign in to comment.