]> granicus.if.org Git - clang/commitdiff
Rename SourceManager::isBeforeInSourceLocationOffset -> isBeforeInSLocAddrSpace.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Aug 2011 21:02:35 +0000 (21:02 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Aug 2011 21:02:35 +0000 (21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138378 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/SourceManager.h
lib/Lex/TokenLexer.cpp

index 8e4f9ed1c52ad0dcd40ff0556a9875018a44f5b3..487249560cbd4ba555b4e644cb3f76a73bcb3587 100644 (file)
@@ -1075,21 +1075,20 @@ public:
 
   /// \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;
   }
index 3dcba98bea9c2f770e3ec14b4222fdfb8f77cb7f..66712e827dead9b83103b5c33eaf299ade8412bd 100644 (file)
@@ -397,8 +397,7 @@ void TokenLexer::Lex(Token &Tok) {
   // 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(),