[llvm] r237906 - std::sort must be called with a strict weak ordering.

Manuel Klimek klimek at google.com
Thu May 21 08:38:26 PDT 2015


Author: klimek
Date: Thu May 21 10:38:25 2015
New Revision: 237906

URL: http://llvm.org/viewvc/llvm-project?rev=237906&view=rev
Log:
std::sort must be called with a strict weak ordering.

Found by a debug enabled stl.

Modified:
    llvm/trunk/lib/CodeGen/WinEHPrepare.cpp

Modified: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=237906&r1=237905&r2=237906&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Thu May 21 10:38:25 2015
@@ -731,10 +731,10 @@ bool WinEHPrepare::prepareExceptionHandl
   // to a block within another outlined catch handler that would otherwise
   // be unreachable, we need to outline the nested landing pad before we
   // outline the landing pad which encloses it.
-  if (!isAsynchronousEHPersonality(Personality)) 
-    std::sort(LPads.begin(), LPads.end(), 
-              [this](LandingPadInst* const &L, LandingPadInst* const &R) {
-                return DT->dominates(R->getParent(), L->getParent());
+  if (!isAsynchronousEHPersonality(Personality))
+    std::sort(LPads.begin(), LPads.end(),
+              [this](LandingPadInst *const &L, LandingPadInst *const &R) {
+                return DT->properlyDominates(R->getParent(), L->getParent());
               });
 
   // This container stores the llvm.eh.recover and IndirectBr instructions





More information about the llvm-commits mailing list