diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 2dddb88..50cbb14e 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -218,9 +218,10 @@ void MachineModuleInfo::finalize() { MachineModuleInfo::MachineModuleInfo(MachineModuleInfo &&MMI) : TM(std::move(MMI.TM)), Context(MMI.TM.getTargetTriple(), MMI.TM.getMCAsmInfo(), - MMI.TM.getMCRegisterInfo(), MMI.TM.getObjFileLowering(), - MMI.TM.getMCSubtargetInfo(), nullptr, nullptr, false), + MMI.TM.getMCRegisterInfo(), MMI.TM.getMCSubtargetInfo(), nullptr, + nullptr, false), MachineFunctions(std::move(MMI.MachineFunctions)) { + Context.setObjectFileInfo(MMI.TM.getObjFileLowering()); ObjFileMMI = MMI.ObjFileMMI; CurCallSite = MMI.CurCallSite; UsesMSVCFloatingPoint = MMI.UsesMSVCFloatingPoint; @@ -234,17 +235,19 @@ MachineModuleInfo::MachineModuleInfo(MachineModuleInfo &&MMI) MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM) : TM(*TM), Context(TM->getTargetTriple(), TM->getMCAsmInfo(), - TM->getMCRegisterInfo(), TM->getObjFileLowering(), - TM->getMCSubtargetInfo(), nullptr, nullptr, false) { + TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), + nullptr, nullptr, false) { + Context.setObjectFileInfo(TM->getObjFileLowering()); initialize(); } MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM, MCContext *ExtContext) : TM(*TM), Context(TM->getTargetTriple(), TM->getMCAsmInfo(), - TM->getMCRegisterInfo(), TM->getObjFileLowering(), - TM->getMCSubtargetInfo(), nullptr, nullptr, false), + TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), + nullptr, nullptr, false), ExternalContext(ExtContext) { + Context.setObjectFileInfo(TM->getObjFileLowering()); initialize(); } |