[cfe-commits] r60843 - in /cfe/trunk: include/clang/Lex/PTHManager.h lib/Lex/PTHLexer.cpp
Ted Kremenek
kremenek at apple.com
Wed Dec 10 11:40:32 PST 2008
Author: kremenek
Date: Wed Dec 10 13:40:23 2008
New Revision: 60843
URL: http://llvm.org/viewvc/llvm-project?rev=60843&view=rev
Log:
Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.
Modified:
cfe/trunk/include/clang/Lex/PTHManager.h
cfe/trunk/lib/Lex/PTHLexer.cpp
Modified: cfe/trunk/include/clang/Lex/PTHManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PTHManager.h?rev=60843&r1=60842&r2=60843&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PTHManager.h (original)
+++ cfe/trunk/include/clang/Lex/PTHManager.h Wed Dec 10 13:40:23 2008
@@ -38,7 +38,7 @@
/// IdMap - A lazily generated cache mapping from persistent identifiers to
/// IdentifierInfo*.
- void* PerIDCache;
+ IdentifierInfo** PerIDCache;
/// FileLookup - Abstract data structure used for mapping between files
/// and token data in the PTH file.
@@ -59,7 +59,8 @@
/// This constructor is intended to only be called by the static 'Create'
/// method.
PTHManager(const llvm::MemoryBuffer* buf, void* fileLookup,
- const char* idDataTable, void* perIDCache, Preprocessor& pp);
+ const char* idDataTable, IdentifierInfo** perIDCache,
+ Preprocessor& pp);
// Do not implement.
PTHManager();
Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=60843&r1=60842&r2=60843&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Wed Dec 10 13:40:23 2008
@@ -236,7 +236,7 @@
//===----------------------------------------------------------------------===//
PTHManager::PTHManager(const llvm::MemoryBuffer* buf, void* fileLookup,
- const char* idDataTable, void* perIDCache,
+ const char* idDataTable, IdentifierInfo** perIDCache,
Preprocessor& pp)
: Buf(buf), PerIDCache(perIDCache), FileLookup(fileLookup),
IdDataTable(idDataTable), ITable(pp.getIdentifierTable()), PP(pp) {}
@@ -324,7 +324,7 @@
--persistentID;
// Check if the IdentifierInfo has already been resolved.
- IdentifierInfo*& II = ((IdentifierInfo**) PerIDCache)[persistentID];
+ IdentifierInfo*& II = PerIDCache[persistentID];
if (II) return II;
// Look in the PTH file for the string data for the IdentifierInfo object.
More information about the cfe-commits
mailing list