From 044eb2f6afba375a914ac9d8024f8f5142bb912e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:10:56 +0000 Subject: Vendor import of llvm trunk r321017: https://llvm.org/svn/llvm-project/llvm/trunk@321017 --- lib/CodeGen/MachineModuleInfo.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/MachineModuleInfo.cpp') diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 825290a438a6..8f0b89657d02 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -15,6 +15,7 @@ #include "llvm/ADT/TinyPtrVector.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/TargetLoweringObjectFile.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Instructions.h" @@ -26,7 +27,6 @@ #include "llvm/Pass.h" #include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetMachine.h" #include #include @@ -207,9 +207,9 @@ bool MachineModuleInfo::doInitialization(Module &M) { ObjFileMMI = nullptr; CurCallSite = 0; DbgInfoAvailable = UsesVAFloatArgument = UsesMorestackAddr = false; + HasSplitStack = HasNosplitStack = false; AddrLabelSymbols = nullptr; TheModule = &M; - return false; } @@ -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