[llvm-commits] CVS: llvm/lib/Target/SubtargetFeature.cpp

Jeff Cohen jeffc at jolt-lang.org
Thu Jan 26 12:41:46 PST 2006



Changes in directory llvm/lib/Target:

SubtargetFeature.cpp updated: 1.8 -> 1.9
---
Log message:

Improve compatibility with VC2005, patch by Morten Ofstad!

---
Diffs of the changes:  (+4 -1)

 SubtargetFeature.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/SubtargetFeature.cpp
diff -u llvm/lib/Target/SubtargetFeature.cpp:1.8 llvm/lib/Target/SubtargetFeature.cpp:1.9
--- llvm/lib/Target/SubtargetFeature.cpp:1.8	Tue Oct 25 10:15:28 2005
+++ llvm/lib/Target/SubtargetFeature.cpp	Thu Jan 26 14:41:32 2006
@@ -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






More information about the llvm-commits mailing list