diff options
author | Vivek Pandya <vivekvpandya@gmail.com> | 2017-10-11 17:12:59 +0000 |
---|---|---|
committer | Vivek Pandya <vivekvpandya@gmail.com> | 2017-10-11 17:12:59 +0000 |
commit | 9590658fb88d40b88ad5bb34c66c946513579384 (patch) | |
tree | 7153e7514adc5b98d16cc7a026988c9644b7fa47 /llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | |
parent | 87867988f9a57bae14a1d14865cca926205685ba (diff) | |
download | bcm5719-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/Transforms/Instrumentation/PGOInstrumentation.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 82c89a67445..f8223496997 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -1510,8 +1510,10 @@ void setProfMetadata(Module *M, Instruction *TI, ArrayRef<uint64_t> EdgeCounts, OS.flush(); Function *F = TI->getParent()->getParent(); OptimizationRemarkEmitter ORE(F); - ORE.emit(OptimizationRemark(DEBUG_TYPE, "pgo-instrumentation", TI) - << BrCondStr << " is true with probability : " << BranchProbStr); + ORE.emit([&]() { + return OptimizationRemark(DEBUG_TYPE, "pgo-instrumentation", TI) + << BrCondStr << " is true with probability : " << BranchProbStr; + }); } } |