diff options
author | David Greene <greened@obbligato.org> | 2007-07-10 22:00:30 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-07-10 22:00:30 +0000 |
commit | 67fcdf7f6579fcc070f019096cedf80d5a834554 (patch) | |
tree | 85167f924916f19433604a5ce2c02378f0706f05 /lib/CodeGen/BranchFolding.cpp | |
parent | 8202010364e1bfe6111f1ce62f154499b80877fb (diff) |
Make this work with GLIBCXX_DEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index d0dcc708d0..431bc4eca3 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -429,8 +429,15 @@ static bool MergeCompare(const std::pair<unsigned,MachineBasicBlock*> &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 |