Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.

llvm-svn: 62492
This commit is contained in:
Chris Lattner
2009-01-19 06:57:37 +00:00
parent 46b50d490d
commit 02495d80ef
2 changed files with 1 additions and 4 deletions

View File

@@ -65,7 +65,6 @@ private:
class SourceLocation {
unsigned ID;
friend class SourceManager;
public:
enum {
// FileID Layout:
// bit 31: 0 -> FileID, 1 -> MacroID (invalid for FileID)
@@ -88,6 +87,7 @@ public:
// Useful constants.
ChunkSize = (1 << FilePosBits)
};
public:
SourceLocation() : ID(0) {} // 0 is an invalid FileID.

View File

@@ -40,9 +40,6 @@ SourceLocation ScratchBuffer::getToken(const char *Buf, unsigned Len) {
// Remember that we used these bytes.
BytesUsed += Len;
assert(BytesUsed-Len < (1 << SourceLocation::FilePosBits) &&
"Out of range file position!");
return BufferStartLoc.getFileLocWithOffset(BytesUsed-Len);
}