summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-12-15 22:22:46 +0000
committerMatthias Braun <matze@braunis.de>2017-12-15 22:22:46 +0000
commit4684033a2f991279187a4db8331fc514ac80293d (patch)
tree6977e0bde666459a929919a64bb21d776587cbef /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent89488fffddc65ae22d62608adb506085df5f6daf (diff)
downloadbcm5719-llvm-4684033a2f991279187a4db8331fc514ac80293d.tar.gz
bcm5719-llvm-4684033a2f991279187a4db8331fc514ac80293d.zip
MachineFunction: Slight refactoring; NFC
Slight cleanup/refactor in preparation for upcoming commit. llvm-svn: 320882
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 560df08c980..8f0b89657d0 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -276,7 +276,8 @@ MachineModuleInfo::getOrCreateMachineFunction(const Function &F) {
MachineFunction *MF;
if (I.second) {
// No pre-existing machine function, create a new one.
- MF = new MachineFunction(&F, TM, NextFnNum++, *this);
+ const TargetSubtargetInfo &STI = *TM.getSubtargetImpl(F);
+ MF = new MachineFunction(F, TM, STI, NextFnNum++, *this);
// Update the set entry.
I.first->second.reset(MF);
} else {
OpenPOWER on IntegriCloud