[llvm] r352776 - [ADT] Fix a typo in isOSVersionLT that breaks the Micro version check

Bob Wilson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 09:59:00 PST 2019


Author: bwilson
Date: Thu Jan 31 09:58:59 2019
New Revision: 352776

URL: http://llvm.org/viewvc/llvm-project?rev=352776&view=rev
Log:
[ADT] Fix a typo in isOSVersionLT that breaks the Micro version check

The original commit of this function (r129800 in 2011) had a typo where
part of the "Micro" version check was actually comparing against the "Minor"
version number.

Modified:
    llvm/trunk/include/llvm/ADT/Triple.h

Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=352776&r1=352775&r2=352776&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Thu Jan 31 09:58:59 2019
@@ -414,7 +414,7 @@ public:
     if (LHS[1] != Minor)
       return LHS[1] < Minor;
     if (LHS[2] != Micro)
-      return LHS[1] < Micro;
+      return LHS[2] < Micro;
 
     return false;
   }




More information about the llvm-commits mailing list