[MustExecute][NFC] Copy function_ref instead of passing a reference
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 11 Apr 2020 17:36:24 +0000 (12:36 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 16 Apr 2020 05:55:34 +0000 (00:55 -0500)
llvm/include/llvm/Analysis/MustExecute.h

index aa54db5..f40fa1f 100644 (file)
@@ -468,7 +468,7 @@ struct MustBeExecutedContextExplorer {
   /// This method will evaluate \p Pred and return
   /// true if \p Pred holds in every instruction.
   bool checkForAllContext(const Instruction *PP,
-                          const function_ref<bool(const Instruction *)> &Pred) {
+                          function_ref<bool(const Instruction *)> Pred) {
     for (auto EIt = begin(PP), EEnd = end(PP); EIt != EEnd; ++EIt)
       if (!Pred(*EIt))
         return false;