diff options
author | Sridhar Gopinath <sridhar.g@utexas.edu> | 2020-07-24 10:44:48 -0700 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2020-07-27 14:10:05 -0700 |
commit | 4b5412b5dbc87096e420de5172837b4bd5ab9485 (patch) | |
tree | c27aa78df76ffcd832460131c4f2d618b42cf024 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | bf544fa1c3cb80f24d85e84559fb11193846259f (diff) | |
download | llvm-4b5412b5dbc87096e420de5172837b4bd5ab9485.zip llvm-4b5412b5dbc87096e420de5172837b4bd5ab9485.tar.gz llvm-4b5412b5dbc87096e420de5172837b4bd5ab9485.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |