[cfe-commits] r138378 - in /cfe/trunk: include/clang/Basic/SourceManager.h lib/Lex/TokenLexer.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Aug 23 14:02:35 PDT 2011
Author: akirtzidis
Date: Tue Aug 23 16:02:35 2011
New Revision: 138378
URL: http://llvm.org/viewvc/llvm-project?rev=138378&view=rev
Log:
Rename SourceManager::isBeforeInSourceLocationOffset -> isBeforeInSLocAddrSpace.
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/lib/Lex/TokenLexer.cpp
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=138378&r1=138377&r2=138378&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Tue Aug 23 16:02:35 2011
@@ -1075,21 +1075,20 @@
/// \brief Determines the order of 2 source locations in the "source location
/// address space".
- bool isBeforeInSourceLocationOffset(SourceLocation LHS,
- SourceLocation RHS) const {
- return isBeforeInSourceLocationOffset(LHS, RHS.getOffset());
+ bool isBeforeInSLocAddrSpace(SourceLocation LHS, SourceLocation RHS) const {
+ return isBeforeInSLocAddrSpace(LHS, RHS.getOffset());
}
/// \brief Determines the order of a source location and a source location
/// offset in the "source location address space".
///
/// Note that we always consider source locations loaded from
- bool isBeforeInSourceLocationOffset(SourceLocation LHS, unsigned RHS) const {
+ bool isBeforeInSLocAddrSpace(SourceLocation LHS, unsigned RHS) const {
unsigned LHSOffset = LHS.getOffset();
bool LHSLoaded = LHSOffset >= CurrentLoadedOffset;
bool RHSLoaded = RHS >= CurrentLoadedOffset;
if (LHSLoaded == RHSLoaded)
- return LHS.getOffset() < RHS;
+ return LHSOffset < RHS;
return LHSLoaded;
}
Modified: cfe/trunk/lib/Lex/TokenLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenLexer.cpp?rev=138378&r1=138377&r2=138378&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/TokenLexer.cpp (original)
+++ cfe/trunk/lib/Lex/TokenLexer.cpp Tue Aug 23 16:02:35 2011
@@ -397,8 +397,7 @@
// that captures all of this.
if (ExpandLocStart.isValid() && // Don't do this for token streams.
// Check that the token's location was not already set properly.
- SM.isBeforeInSourceLocationOffset(Tok.getLocation(),
- MacroStartSLocOffset)) {
+ SM.isBeforeInSLocAddrSpace(Tok.getLocation(), MacroStartSLocOffset)) {
SourceLocation instLoc;
if (Tok.is(tok::comment)) {
instLoc = SM.createExpansionLoc(Tok.getLocation(),
More information about the cfe-commits
mailing list