[cfe-commits] r140238 - /cfe/trunk/lib/Serialization/ASTReader.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Sep 20 23:42:26 PDT 2011


Author: d0k
Date: Wed Sep 21 01:42:26 2011
New Revision: 140238

URL: http://llvm.org/viewvc/llvm-project?rev=140238&view=rev
Log:
Fix MSVC9 build by providing a full comparator object to lower_bound.

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=140238&r1=140237&r2=140238&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Sep 21 01:42:26 2011
@@ -2905,12 +2905,18 @@
 
   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);
   }





More information about the cfe-commits mailing list