From 4684033a2f991279187a4db8331fc514ac80293d Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 15 Dec 2017 22:22:46 +0000 Subject: MachineFunction: Slight refactoring; NFC Slight cleanup/refactor in preparation for upcoming commit. llvm-svn: 320882 --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') 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 { -- cgit v1.2.3