mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.
llvm-svn: 62492
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user