summaryrefslogtreecommitdiff
path: root/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-07-11 08:47:55 +0000
committerDuncan Sands <baldrick@free.fr>2007-07-11 08:47:55 +0000
commit97b4ac8c844e08ce1c4f4a73b85ba56775a2a6c5 (patch)
tree3fec6b984465c71639f06db4b5bdb885fd74e118 /lib/CodeGen/BranchFolding.cpp
parentb9591c667d956d0607f7388665649fb0852a988c (diff)
downloadllvm-97b4ac8c844e08ce1c4f4a73b85ba56775a2a6c5.tar.gz
llvm-97b4ac8c844e08ce1c4f4a73b85ba56775a2a6c5.tar.bz2
llvm-97b4ac8c844e08ce1c4f4a73b85ba56775a2a6c5.tar.xz
If assertions are not enabled, we should return False here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r--lib/CodeGen/BranchFolding.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index 431bc4eca3..0fca985179 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -430,13 +430,12 @@ static bool MergeCompare(const std::pair<unsigned,MachineBasicBlock*> &p,
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);
}
}