diff options
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 |