[llvm-commits] [llvm] r38535 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp

Duncan Sands baldrick at free.fr
Wed Jul 11 01:47:55 PDT 2007


Author: baldrick
Date: Wed Jul 11 03:47:55 2007
New Revision: 38535

URL: http://llvm.org/viewvc/llvm-project?rev=38535&view=rev
Log:
If assertions are not enabled, we should return False here.

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

Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=38535&r1=38534&r2=38535&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Wed Jul 11 03:47:55 2007
@@ -430,13 +430,12 @@
     else if (p.second->getNumber() > q.second->getNumber())
       return false;
     else {
-      // _GLIBCXX_DEBUG needs to check strict weak ordering and it
-      // does it by doing a compare on the same object.
-#ifdef _GLIBCXX_DEBUG
-      return(false);
-#else
+      // _GLIBCXX_DEBUG checks strict weak ordering, which involves comparing
+      // an object with itself.
+#ifndef _GLIBCXX_DEBUG
       assert(0 && "Predecessor appears twice");
 #endif
+      return(false);
     }
 }
 





More information about the llvm-commits mailing list