Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.
llvm-svn: 60843
This commit is contained in:
parent
68e167df8e
commit
d40ab7b72a
|
@ -38,7 +38,7 @@ class PTHManager {
|
|||
|
||||
/// 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 @@ class PTHManager {
|
|||
/// 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();
|
||||
|
|
|
@ -236,7 +236,7 @@ public:
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
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 @@ IdentifierInfo* PTHManager::ReadIdentifierInfo(const char*& D) {
|
|||
--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.
|
||||
|
|
Loading…
Reference in New Issue