Fix MSVC9 build by providing a full comparator object to lower_bound.
llvm-svn: 140238
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 6e8d1cb..5f489d4 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -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);
}