summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp11
1 files changed, 6 insertions, 5 deletions
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
OpenPOWER on IntegriCloud