summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-08-24 16:46:31 +0000
committerDan Gohman <dan433584@gmail.com>2015-08-24 16:46:31 +0000
commite419a7c307b91b359dfd6b9dd78666d02bf478a7 (patch)
treebc4bf3efffe338ca04bf2681239dc0a85d0132ef /llvm/lib/Target/WebAssembly
parent08fc966d3c25cd943d1b07b50fa54ff390e8ee29 (diff)
downloadbcm5719-llvm-e419a7c307b91b359dfd6b9dd78666d02bf478a7.tar.gz
bcm5719-llvm-e419a7c307b91b359dfd6b9dd78666d02bf478a7.zip
[WebAssembly] Use the checked form of MachineFunction::getSubtarget. NFC.
llvm-svn: 245852
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp3
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
index a1c3350ed73..4216fb6ebe2 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -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);
}
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
index fec94554833..8a2cf1ad46e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
@@ -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);
OpenPOWER on IntegriCloud