From: David Greene Date: Tue, 10 Jul 2007 22:00:30 +0000 (+0000) Subject: Make this work with GLIBCXX_DEBUG. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=67fcdf7f6579fcc070f019096cedf80d5a834554;p=oota-llvm.git Make this work with GLIBCXX_DEBUG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index d0dcc708d06..431bc4eca35 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -429,8 +429,15 @@ static bool MergeCompare(const std::pair &p, return true; else if (p.second->getNumber() > q.second->getNumber()) return false; - else + 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 assert(0 && "Predecessor appears twice"); +#endif + } } // See if any of the blocks in MergePotentials (which all have a common single