summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorVivek Pandya <vivekvpandya@gmail.com>2017-10-11 17:12:59 +0000
committerVivek Pandya <vivekvpandya@gmail.com>2017-10-11 17:12:59 +0000
commit9590658fb88d40b88ad5bb34c66c946513579384 (patch)
tree7153e7514adc5b98d16cc7a026988c9644b7fa47 /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parent87867988f9a57bae14a1d14865cca926205685ba (diff)
downloadbcm5719-llvm-9590658fb88d40b88ad5bb34c66c946513579384.tar.gz
bcm5719-llvm-9590658fb88d40b88ad5bb34c66c946513579384.zip
[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
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