From: Benjamin Kramer Date: Wed, 21 Sep 2011 16:58:20 +0000 (+0000) Subject: More MSVC9 unbreaking. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=196e71e1357b14076c42f4a3458e6ea71714eb06;p=clang More MSVC9 unbreaking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140256 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 3f288b0fd9..438eba00ba 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -100,12 +100,18 @@ struct PPEntityComp { explicit PPEntityComp(const SourceManager &SM) : SM(SM) { } - bool operator()(PreprocessedEntity *L, SourceLocation RHS) { + bool operator()(PreprocessedEntity *L, PreprocessedEntity *R) const { + SourceLocation LHS = getLoc(L); + SourceLocation RHS = getLoc(R); + return SM.isBeforeInTranslationUnit(LHS, RHS); + } + + bool operator()(PreprocessedEntity *L, SourceLocation RHS) const { SourceLocation LHS = getLoc(L); return SM.isBeforeInTranslationUnit(LHS, RHS); } - bool operator()(SourceLocation LHS, PreprocessedEntity *R) { + bool operator()(SourceLocation LHS, PreprocessedEntity *R) const { SourceLocation RHS = getLoc(R); return SM.isBeforeInTranslationUnit(LHS, RHS); }