From: David Blaikie Date: Fri, 2 Jun 2017 18:25:29 +0000 (+0000) Subject: BitcodeWriter: Removing unnecessary std::function in favor of template X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cc5d919538b303edd46519588f2a7319999c146;p=llvm BitcodeWriter: Removing unnecessary std::function in favor of template More cleanup from post-commit discussion on r304516 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304579 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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)