aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-06-02 18:25:29 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-06-02 18:25:29 +0000
commit358c012db2c4b7b2cb74e3c8d91fbf5052de557c (patch)
treeba3499c999460dfd7e1ca414d1bd6b47316dc828 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentb933ad3a779f96b0e07c35e54a9b2aeed6bc9be4 (diff)
downloadllvm-358c012db2c4b7b2cb74e3c8d91fbf5052de557c.zip
llvm-358c012db2c4b7b2cb74e3c8d91fbf5052de557c.tar.gz
llvm-358c012db2c4b7b2cb74e3c8d91fbf5052de557c.tar.bz2
BitcodeWriter: Removing unnecessary std::function in favor of template
More cleanup from post-commit discussion on r304516 llvm-svn: 304579
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 6301ae2..9043b8c 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -351,7 +351,8 @@ public:
/// Calls the callback for each value GUID and summary to be written to
/// bitcode. This hides the details of whether they are being pulled from the
/// entire index or just those in a provided ModuleToSummariesForIndex map.
- void forEachSummary(std::function<void(GVInfo)> Callback) {
+ template<typename Functor>
+ void forEachSummary(Functor Callback) {
if (ModuleToSummariesForIndex) {
for (auto &M : *ModuleToSummariesForIndex)
for (auto &Summary : M.second)