diff --git a/lib/SILOptimizer/Transforms/PerformanceInliner.cpp b/lib/SILOptimizer/Transforms/PerformanceInliner.cpp index 73a144710dea1..74f6bf0838772 100644 --- a/lib/SILOptimizer/Transforms/PerformanceInliner.cpp +++ b/lib/SILOptimizer/Transforms/PerformanceInliner.cpp @@ -499,7 +499,7 @@ bool SILPerformanceInliner::isProfitableToInline( // This is the final inlining decision. if (CalleeCost > Benefit) { - ORE.emit([&]() { + OptRemark::Emitter::emitOrDebug(DEBUG_TYPE, &ORE, [&]() { using namespace OptRemark; return RemarkMissed("NoInlinedCost", *AI.getInstruction()) << "Not profitable to inline function " << NV("Callee", Callee) @@ -519,7 +519,7 @@ bool SILPerformanceInliner::isProfitableToInline( << ", bb=" << Callee->size() << ", c-bb=" << NumCallerBlocks << "} " << Callee->getName() << '\n'); - ORE.emit([&]() { + OptRemark::Emitter::emitOrDebug(DEBUG_TYPE, &ORE, [&]() { using namespace OptRemark; return RemarkPassed("Inlined", *AI.getInstruction()) << NV("Callee", Callee) << " inlined into "