[llvm] r297902 - Try to fix build break due to template argument deduction.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 15:32:59 PDT 2017


Author: zturner
Date: Wed Mar 15 17:32:59 2017
New Revision: 297902

URL: http://llvm.org/viewvc/llvm-project?rev=297902&view=rev
Log:
Try to fix build break due to template argument deduction.

Modified:
    llvm/trunk/tools/llvm-pdbdump/Diff.cpp

Modified: llvm/trunk/tools/llvm-pdbdump/Diff.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/Diff.cpp?rev=297902&r1=297901&r2=297902&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/Diff.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/Diff.cpp Wed Mar 15 17:32:59 2017
@@ -54,11 +54,12 @@ static void set_differences(Range &&R1,
   }
 }
 
-template<typename Range>
-static void set_differences(Range &&R1, Range &&R2,
-  SmallVectorImpl<ValueOfRange<Range>> *OnlyLeft,
-  SmallVectorImpl<ValueOfRange<Range>> *OnlyRight,
-  SmallVectorImpl<ValueOfRange<Range>> *Intersection) {
+template <typename Range>
+static void
+set_differences(Range &&R1, Range &&R2,
+                SmallVectorImpl<ValueOfRange<Range>> *OnlyLeft,
+                SmallVectorImpl<ValueOfRange<Range>> *OnlyRight,
+                SmallVectorImpl<ValueOfRange<Range>> *Intersection = nullptr) {
   std::less<ValueOfRange<Range>> Comp;
   set_differences(std::forward<Range>(R1), std::forward<Range>(R2), OnlyLeft, OnlyRight, Intersection, Comp);
 }
@@ -338,7 +339,7 @@ Error DiffStyle::diffStringTable() {
     SmallVector<StringRef, 64> OnlyP;
     SmallVector<StringRef, 64> OnlyQ;
 
-    set_differences(Strings1, Strings2, &OnlyP, &OnlyQ, nullptr);
+    set_differences(Strings1, Strings2, &OnlyP, &OnlyQ);
 
     if (!OnlyP.empty()) {
       HasDiff = true;




More information about the llvm-commits mailing list