[cfe-commits] r160928 - /cfe/trunk/include/clang/Basic/SourceManager.h
Benjamin Kramer
benny.kra at googlemail.com
Sun Jul 29 04:12:46 PDT 2012
Author: d0k
Date: Sun Jul 29 06:12:46 2012
New Revision: 160928
URL: http://llvm.org/viewvc/llvm-project?rev=160928&view=rev
Log:
Microoptimize isOffsetInFileID a bit.
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=160928&r1=160927&r2=160928&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Sun Jul 29 06:12:46 2012
@@ -1517,13 +1517,12 @@
return true;
// If it is the last local entry, then it does if the location is local.
- if (static_cast<unsigned>(FID.ID+1) == LocalSLocEntryTable.size()) {
+ if (FID.ID+1 == static_cast<int>(LocalSLocEntryTable.size()))
return SLocOffset < NextLocalOffset;
- }
// Otherwise, the entry after it has to not include it. This works for both
// local and loaded entries.
- return SLocOffset < getSLocEntry(FileID::get(FID.ID+1)).getOffset();
+ return SLocOffset < getSLocEntryByID(FID.ID+1).getOffset();
}
/// \brief Create a new fileID for the specified ContentCache and
More information about the cfe-commits
mailing list