From 9590658fb88d40b88ad5bb34c66c946513579384 Mon Sep 17 00:00:00 2001 From: Vivek Pandya Date: Wed, 11 Oct 2017 17:12:59 +0000 Subject: [NFC] Convert OptimizationRemarkEmitter old emit() calls to new closure parameterized emit() calls Summary: This is not functional change to adopt new emit() API added in r313691. Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38285 llvm-svn: 315476 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp') diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index e105dbe18ec..d9e9b3360a0 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -960,11 +960,12 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { MFI.setStackSize(StackSize); NumBytesStackSpace += StackSize; - MachineOptimizationRemarkAnalysis R( - DEBUG_TYPE, "StackSize", Fn.getFunction()->getSubprogram(), &Fn.front()); - R << ore::NV("NumStackBytes", StackSize) - << " stack bytes in function"; - ORE->emit(R); + ORE->emit([&]() { + return MachineOptimizationRemarkAnalysis(DEBUG_TYPE, "StackSize", + Fn.getFunction()->getSubprogram(), + &Fn.front()) + << ore::NV("NumStackBytes", StackSize) << " stack bytes in function"; + }); } /// insertPrologEpilogCode - Scan the function for modified callee saved -- cgit v1.2.3