summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2006-01-26 20:41:32 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2006-01-26 20:41:32 +0000
commit9471c8a93b117d8ac01c4ef1cb9faa583e03dec0 (patch)
tree4cebe10aa3a8220b4bf6d1c4ff31487463bcdeb0 /lib/Transforms/Scalar/CorrelatedExprs.cpp
parent4ccb070f158b0f331c68de800c6bab8c31c2ecb6 (diff)
downloadllvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.tar.gz
llvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.tar.bz2
llvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.tar.xz
Improve compatibility with VC2005, patch by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CorrelatedExprs.cpp')
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp
index d00614b5d3..3da7e6e2df 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -135,7 +135,8 @@ namespace {
Relation &getRelation(Value *V) {
// Binary search for V's entry...
std::vector<Relation>::iterator I =
- std::lower_bound(Relationships.begin(), Relationships.end(), V);
+ std::lower_bound(Relationships.begin(), Relationships.end(),
+ Relation(V));
// If we found the entry, return it...
if (I != Relationships.end() && I->getValue() == V)
@@ -148,7 +149,8 @@ namespace {
const Relation *requestRelation(Value *V) const {
// Binary search for V's entry...
std::vector<Relation>::const_iterator I =
- std::lower_bound(Relationships.begin(), Relationships.end(), V);
+ std::lower_bound(Relationships.begin(), Relationships.end(),
+ Relation(V));
if (I != Relationships.end() && I->getValue() == V)
return &*I;
return 0;