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 | d9034f717a5fa2ba18c729a34440e3f087ff4a6a (patch) | |
| tree | 398d5cbe7774eaf501e7d930c0357e36a15570ce /llvm/lib | |
| parent | 94579dbd2e78f0864b801093146e5e925ff402e8 (diff) | |
| download | bcm5719-llvm-d9034f717a5fa2ba18c729a34440e3f087ff4a6a.tar.gz bcm5719-llvm-d9034f717a5fa2ba18c729a34440e3f087ff4a6a.zip | |
Make this work with GLIBCXX_DEBUG.
llvm-svn: 38516
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index d0dcc708d06..431bc4eca35 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/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 |

