]> granicus.if.org Git - llvm/commitdiff
BitcodeWriter: Removing unnecessary std::function in favor of template
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 2 Jun 2017 18:25:29 +0000 (18:25 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 2 Jun 2017 18:25:29 +0000 (18:25 +0000)
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

lib/Bitcode/Writer/BitcodeWriter.cpp

index 6301ae209247a4ba0bef00eb159f8a5b16aec902..9043b8c12d25a6e7ef8e7d0b8d64497d5c77a31a 100644 (file)
@@ -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)