OSDN Git Service

Fixing build bot error: adding const qualifiers to std::sort lambda.
authorPuyan Lotfi <puyan@puyan.org>
Sun, 13 May 2018 06:50:55 +0000 (06:50 +0000)
committerPuyan Lotfi <puyan@puyan.org>
Sun, 13 May 2018 06:50:55 +0000 (06:50 +0000)
Errors were not reproducible on clang-6.0 on ubuntu 16.04.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332192 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MIRCanonicalizerPass.cpp

index a68ea19..a04e994 100644 (file)
@@ -135,7 +135,7 @@ rescheduleLexographically(std::vector<MachineInstr *> instructions,
   }
 
   std::sort(StringInstrMap.begin(), StringInstrMap.end(),
-            [](StringInstrPair &a, StringInstrPair &b) {
+            [](const StringInstrPair &a, const StringInstrPair &b) -> bool {
               return (a.first < b.first);
             });