summaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorCedric Venet <cedric.venet@laposte.net>2009-02-14 16:15:20 +0000
committerCedric Venet <cedric.venet@laposte.net>2009-02-14 16:15:20 +0000
commitea684e699ea84e61711e279f5fa7a1b9f3d46bc2 (patch)
tree32dea78f1f9c230a4997c484d8ba2fc60e7b141b /lib/Basic/SourceManager.cpp
parent487cdee2f5bf641af4532fe4af79545997d8f5e3 (diff)
downloadclang-ea684e699ea84e61711e279f5fa7a1b9f3d46bc2.tar.gz
Fix the build on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index cc75b87c46..e023a91f2f 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -94,6 +94,12 @@ struct LineEntry {
}
};
+// needed for FindNearestLineEntry (upper_bound of LineEntry)
+inline bool operator<(const LineEntry &lhs, const LineEntry &rhs) {
+ // FIXME: should check the other field?
+ return lhs.FileOffset < rhs.FileOffset;
+}
+
inline bool operator<(const LineEntry &E, unsigned Offset) {
return E.FileOffset < Offset;
}