Skip to content

Commit 5ed07a2

Browse files
committed
Added forwarding the MMI move constructor for MMIWP.
1 parent dad7442 commit 5ed07a2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm/include/llvm/CodeGen/MachineModuleInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ class MachineModuleInfoWrapperPass : public ImmutablePass {
208208
explicit MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM,
209209
MCContext *ExtContext);
210210

211+
explicit MachineModuleInfoWrapperPass(MachineModuleInfo &&MMI);
212+
211213
// Initialization and Finalization
212214
bool doInitialization(Module &) override;
213215
bool doFinalization(Module &) override;

llvm/lib/CodeGen/MachineModuleInfo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
180180
initializeMachineModuleInfoWrapperPassPass(*PassRegistry::getPassRegistry());
181181
}
182182

183+
MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
184+
MachineModuleInfo &&MMI): ImmutablePass(ID), MMI(std::move(MMI)) {
185+
initializeMachineModuleInfoWrapperPassPass(*PassRegistry::getPassRegistry());
186+
}
187+
183188
// Handle the Pass registration stuff necessary to use DataLayout's.
184189
INITIALIZE_PASS(MachineModuleInfoWrapperPass, "machinemoduleinfo",
185190
"Machine Module Information", false, false)

0 commit comments

Comments
 (0)