summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitd5ea194b6cd0fc980643349bdc6d3875bcb0515d (patch)
treeeabd02bf87f1bc29b473972688af4b67fd305ac8 /llvm/lib
parent74a541024ffac39d7f86f3f0df066dad053bad7e (diff)
downloadbcm5719-llvm-d5ea194b6cd0fc980643349bdc6d3875bcb0515d.tar.gz
bcm5719-llvm-d5ea194b6cd0fc980643349bdc6d3875bcb0515d.zip
If assertions are not enabled, we should return False here.
llvm-svn: 38535
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 431bc4eca35..0fca9851794 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/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);
}
}
OpenPOWER on IntegriCloud