]> granicus.if.org Git - clang/commitdiff
Fix MSVC9 build by providing a full comparator object to lower_bound.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 21 Sep 2011 06:42:26 +0000 (06:42 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 21 Sep 2011 06:42:26 +0000 (06:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140238 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 6e8d1cb22f596fc9bc662c0d5d7f32acf08ee8cc..5f489d4067864ae596739d93976230dba851684c 100644 (file)
@@ -2905,12 +2905,18 @@ struct PPEntityComp {
 
   PPEntityComp(const ASTReader &Reader, Module &M) : Reader(Reader), M(M) { }
 
-  bool operator()(const PPEntityOffset &L, SourceLocation RHS) {
+  bool operator()(const PPEntityOffset &L, const PPEntityOffset &R) const {
+    SourceLocation LHS = getLoc(L);
+    SourceLocation RHS = getLoc(R);
+    return Reader.getSourceManager().isBeforeInTranslationUnit(LHS, RHS);
+  }
+
+  bool operator()(const PPEntityOffset &L, SourceLocation RHS) const {
     SourceLocation LHS = getLoc(L);
     return Reader.getSourceManager().isBeforeInTranslationUnit(LHS, RHS);
   }
 
-  bool operator()(SourceLocation LHS, const PPEntityOffset &R) {
+  bool operator()(SourceLocation LHS, const PPEntityOffset &R) const {
     SourceLocation RHS = getLoc(R);
     return Reader.getSourceManager().isBeforeInTranslationUnit(LHS, RHS);
   }