]> granicus.if.org Git - clang/commitdiff
Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.
authorChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 06:57:37 +0000 (06:57 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 06:57:37 +0000 (06:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62492 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/SourceLocation.h
lib/Lex/ScratchBuffer.cpp

index 2e0fb4d6709fdf676c32b408b94981908895cfc6..5c52906723221e1fd9bb539f607621b1249b7299 100644 (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.
   
index ec07a71baf6ea6d14b2860f9d18435d7af7fa844..bef81caac719cef6979a5f5afc10967f1f8621de 100644 (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);
 }