From 358c012db2c4b7b2cb74e3c8d91fbf5052de557c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 2 Jun 2017 18:25:29 +0000 Subject: BitcodeWriter: Removing unnecessary std::function in favor of template More cleanup from post-commit discussion on r304516 llvm-svn: 304579 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 6301ae209247..9043b8c12d25 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 Callback) { + template + void forEachSummary(Functor Callback) { if (ModuleToSummariesForIndex) { for (auto &M : *ModuleToSummariesForIndex) for (auto &Summary : M.second) -- cgit v1.2.3