From 9c6c1a43f4fbc141be13280da69b9b69260be10a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 2 Jun 2017 18:25:29 +0000 Subject: [PATCH] BitcodeWriter: Removing unnecessary std::function in favor of template More cleanup from post-commit discussion on r304516 llvm-svn: 304579 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 6301ae20924..9043b8c12d2 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/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)