aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
parent4ccb070f158b0f331c68de800c6bab8c31c2ecb6 (diff)
downloadexternal_llvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.tar.gz
external_llvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.tar.bz2
external_llvm-9471c8a93b117d8ac01c4ef1cb9faa583e03dec0.zip
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 'include')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h3
-rw-r--r--include/llvm/Target/SubtargetFeature.h8
2 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 4606781efd..f4f2b47366 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -64,6 +64,9 @@ namespace llvm {
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
diff --git a/include/llvm/Target/SubtargetFeature.h b/include/llvm/Target/SubtargetFeature.h
index aab8688588..a9f7a71921 100644
--- a/include/llvm/Target/SubtargetFeature.h
+++ b/include/llvm/Target/SubtargetFeature.h
@@ -36,8 +36,8 @@ struct SubtargetFeatureKV {
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 @@ struct SubtargetInfoKV {
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;
}
};