Index: include/llvm/CodeGen/LiveInterval.h
===================================================================
RCS file: /var/cvs/llvm/llvm/include/llvm/CodeGen/LiveInterval.h,v
retrieving revision 1.15
diff -u -r1.15 LiveInterval.h
--- include/llvm/CodeGen/LiveInterval.h	20 Oct 2005 07:37:59 -0000	1.15
+++ include/llvm/CodeGen/LiveInterval.h	26 Jan 2006 13:22:01 -0000
@@ -64,6 +64,9 @@
     return V < LR.start;
   }
 
+  inline bool operator<(const LiveRange &LR, unsigned V) {
+    return LR.start < V;
+  }
 
   /// LiveInterval - This class represents some number of live ranges for a
   /// register or value.  This class also contains a bit of register allocator
Index: include/llvm/Target/SubtargetFeature.h
===================================================================
RCS file: /var/cvs/llvm/llvm/include/llvm/Target/SubtargetFeature.h,v
retrieving revision 1.5
diff -u -r1.5 SubtargetFeature.h
--- include/llvm/Target/SubtargetFeature.h	25 Oct 2005 15:15:28 -0000	1.5
+++ include/llvm/Target/SubtargetFeature.h	26 Jan 2006 13:05:04 -0000
@@ -36,8 +36,8 @@
   uint32_t Value;                       // K-V integer value
   
   // Compare routine for std binary search
-  bool operator<(const std::string &S) const {
-    return strcmp(Key, S.c_str()) < 0;
+  bool operator<(const SubtargetFeatureKV &S) const {
+    return strcmp(Key, S.Key) < 0;
   }
 };
   
@@ -51,8 +51,8 @@
   void *Value;                          // K-V pointer value
   
   // Compare routine for std binary search
-  bool operator<(const std::string &S) const {
-    return strcmp(Key, S.c_str()) < 0;
+  bool operator<(const SubtargetInfoKV &S) const {
+    return strcmp(Key, S.Key) < 0;
   }
 };
   
Index: lib/Target/SubtargetFeature.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Target/SubtargetFeature.cpp,v
retrieving revision 1.8
diff -u -r1.8 SubtargetFeature.cpp
--- lib/Target/SubtargetFeature.cpp	25 Oct 2005 15:15:28 -0000	1.8
+++ lib/Target/SubtargetFeature.cpp	26 Jan 2006 13:07:14 -0000
@@ -112,10 +112,13 @@
 
 /// Find KV in array using binary search.
 template<typename T> const T *Find(const std::string &S, const T *A, size_t L) {
+  // Make the lower bound element we're looking for
+  T KV;
+  KV.Key = S.c_str();
   // Determine the end of the array
   const T *Hi = A + L;
   // Binary search the array
-  const T *F = std::lower_bound(A, Hi, S);
+  const T *F = std::lower_bound(A, Hi, KV);
   // If not found then return NULL
   if (F == Hi || std::string(F->Key) != S) return NULL;
   // Return the found array item
Index: lib/Target/X86/X86FloatingPoint.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86FloatingPoint.cpp,v
retrieving revision 1.48
diff -u -r1.48 X86FloatingPoint.cpp
--- lib/Target/X86/X86FloatingPoint.cpp	22 Jan 2006 23:37:17 -0000	1.48
+++ lib/Target/X86/X86FloatingPoint.cpp	26 Jan 2006 13:36:27 -0000
@@ -281,7 +281,8 @@
     unsigned from;
     unsigned to;
     bool operator<(const TableEntry &TE) const { return from < TE.from; }
-    bool operator<(unsigned V) const { return from < V; }
+    friend bool operator<(const TableEntry &TE, unsigned V) { return TE.from < V; }
+    friend bool operator<(unsigned V, const TableEntry &TE) { return V < TE.from; }
   };
 }
 
Index: lib/Transforms/Scalar/CorrelatedExprs.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp,v
retrieving revision 1.31
diff -u -r1.31 CorrelatedExprs.cpp
--- lib/Transforms/Scalar/CorrelatedExprs.cpp	22 Jan 2006 23:32:06 -0000	1.31
+++ lib/Transforms/Scalar/CorrelatedExprs.cpp	26 Jan 2006 10:34:55 -0000
@@ -135,7 +135,7 @@
     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 +148,7 @@
     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;

