[cfe-commits] r62492 - in /cfe/trunk: include/clang/Basic/SourceLocation.h lib/Lex/ScratchBuffer.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 18 22:57:37 PST 2009
Author: lattner
Date: Mon Jan 19 00:57:37 2009
New Revision: 62492
URL: http://llvm.org/viewvc/llvm-project?rev=62492&view=rev
Log:
Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.
Modified:
cfe/trunk/include/clang/Basic/SourceLocation.h
cfe/trunk/lib/Lex/ScratchBuffer.cpp
Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=62492&r1=62491&r2=62492&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Mon Jan 19 00:57:37 2009
@@ -65,7 +65,6 @@
class SourceLocation {
unsigned ID;
friend class SourceManager;
-public:
enum {
// FileID Layout:
// bit 31: 0 -> FileID, 1 -> MacroID (invalid for FileID)
@@ -88,6 +87,7 @@
// Useful constants.
ChunkSize = (1 << FilePosBits)
};
+public:
SourceLocation() : ID(0) {} // 0 is an invalid FileID.
Modified: cfe/trunk/lib/Lex/ScratchBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ScratchBuffer.cpp?rev=62492&r1=62491&r2=62492&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/ScratchBuffer.cpp (original)
+++ cfe/trunk/lib/Lex/ScratchBuffer.cpp Mon Jan 19 00:57:37 2009
@@ -40,9 +40,6 @@
// Remember that we used these bytes.
BytesUsed += Len;
- assert(BytesUsed-Len < (1 << SourceLocation::FilePosBits) &&
- "Out of range file position!");
-
return BufferStartLoc.getFileLocWithOffset(BytesUsed-Len);
}
More information about the cfe-commits
mailing list