diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-21 16:58:20 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-21 16:58:20 +0000 |
commit | 196e71e1357b14076c42f4a3458e6ea71714eb06 (patch) | |
tree | 6f598aff8dd53c1b76d37a6cb8a1aa21fe5f80a3 /lib/Lex/PreprocessingRecord.cpp | |
parent | f250365ce65412d7d4e331fccf042b6e974c2f14 (diff) |
More MSVC9 unbreaking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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); } |