From 4b5412b5dbc87096e420de5172837b4bd5ab9485 Mon Sep 17 00:00:00 2001 From: Sridhar Gopinath Date: Fri, 24 Jul 2020 10:44:48 -0700 Subject: Fix the move constructor of MMI to move MachineFunctions map The move constructor of MachineModuleInfo currently does not copy the MachineFunctions map. This commit fixes this issue. Patch by Sridhar Gopinath. Thanks! Differential Revision: https://reviews.llvm.org/D84274 --- 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 f866c7c..be08f0a 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -178,7 +178,8 @@ void MachineModuleInfo::finalize() { MachineModuleInfo::MachineModuleInfo(MachineModuleInfo &&MMI) : TM(std::move(MMI.TM)), Context(MMI.TM.getMCAsmInfo(), MMI.TM.getMCRegisterInfo(), - MMI.TM.getObjFileLowering(), nullptr, nullptr, false) { + MMI.TM.getObjFileLowering(), nullptr, nullptr, false), + MachineFunctions(std::move(MMI.MachineFunctions)) { ObjFileMMI = MMI.ObjFileMMI; CurCallSite = MMI.CurCallSite; UsesMSVCFloatingPoint = MMI.UsesMSVCFloatingPoint; -- cgit v1.1