From: Benjamin Kramer Date: Wed, 21 Sep 2011 06:42:26 +0000 (+0000) Subject: Fix MSVC9 build by providing a full comparator object to lower_bound. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88df12521ed20adce83652ba207d39475b7ece71;p=clang Fix MSVC9 build by providing a full comparator object to lower_bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140238 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 6e8d1cb22f..5f489d4067 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -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); }