1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

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
This commit is contained in:
Sridhar Gopinath 2020-07-24 10:44:48 -07:00 committed by Justin Bogner
parent 89408b2ab3
commit bb16a9f85f

View File

@ -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;