diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-18 01:57:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-18 01:57:14 +0000 |
commit | da9d61c96c412f6babc7f824152609562f302388 (patch) | |
tree | 1d67207afd2d37466abb9c95d7aa9cc3f830ab7a /include/clang/Lex/PTHManager.h | |
parent | 42e1ee0702d8267d632df0fdb5c479a582877c6f (diff) |
switch PTH lexer from using "const char*"s to "const unsigned char*"s
internally. This is just a cleanup that reduces the need to cast to
unsigned char before assembling a larger integer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/PTHManager.h')
-rw-r--r-- | include/clang/Lex/PTHManager.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/clang/Lex/PTHManager.h b/include/clang/Lex/PTHManager.h index 67e3666758..b9d2493327 100644 --- a/include/clang/Lex/PTHManager.h +++ b/include/clang/Lex/PTHManager.h @@ -34,11 +34,11 @@ class PTHManager; class PTHSpellingSearch { PTHManager& PTHMgr; - const char* const TableBeg; - const char* const TableEnd; + const unsigned char* const TableBeg; + const unsigned char* const TableEnd; const unsigned NumSpellings; - const char* LinearItr; + const unsigned char* LinearItr; public: enum { SpellingEntrySize = 4*2 }; @@ -46,7 +46,8 @@ public: unsigned getSpellingBinarySearch(unsigned fpos, const char *&Buffer); unsigned getSpellingLinearSearch(unsigned fpos, const char *&Buffer); - PTHSpellingSearch(PTHManager& pm, unsigned numSpellings, const char* tableBeg) + PTHSpellingSearch(PTHManager& pm, unsigned numSpellings, + const unsigned char* tableBeg) : PTHMgr(pm), TableBeg(tableBeg), TableEnd(tableBeg + numSpellings*SpellingEntrySize), @@ -78,11 +79,11 @@ class PTHManager : public IdentifierInfoLookup { /// IdDataTable - Array representing the mapping from persistent IDs to the /// data offset within the PTH file containing the information to /// reconsitute an IdentifierInfo. - const char* const IdDataTable; + const unsigned char* const IdDataTable; /// SortedIdTable - Array ordering persistent identifier IDs by the lexical /// order of their corresponding strings. This is used by get(). - const char* const SortedIdTable; + const unsigned char* const SortedIdTable; /// NumIds - The number of identifiers in the PTH file. const unsigned NumIds; @@ -94,8 +95,8 @@ class PTHManager : public IdentifierInfoLookup { /// This constructor is intended to only be called by the static 'Create' /// method. PTHManager(const llvm::MemoryBuffer* buf, void* fileLookup, - const char* idDataTable, IdentifierInfo** perIDCache, - const char* sortedIdTable, unsigned numIds); + const unsigned char* idDataTable, IdentifierInfo** perIDCache, + const unsigned char* sortedIdTable, unsigned numIds); // Do not implement. PTHManager(); |