forked from qt-creator/qt-creator
Clang: Don't index already indexed symbols
We don't index system headers any more and introduce a first step to decrease double indexing. For that we introduces the SourcesManager which so far tells you only if a file was already indexed for a certain time stamp. Change-Id: Icde54465693ca84a622764c595635cac365c0111 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -37,15 +37,19 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class SourcesManager;
|
||||
|
||||
class CollectMacrosSourceFileCallbacks : public clang::tooling::SourceFileCallbacks
|
||||
{
|
||||
public:
|
||||
CollectMacrosSourceFileCallbacks(SymbolEntries &symbolEntries,
|
||||
SourceLocationEntries &sourceLocationEntries,
|
||||
FilePathCachingInterface &filePathCache)
|
||||
FilePathCachingInterface &filePathCache,
|
||||
SourcesManager &sourcesManager)
|
||||
: m_symbolEntries(symbolEntries),
|
||||
m_sourceLocationEntries(sourceLocationEntries),
|
||||
m_filePathCache(filePathCache)
|
||||
m_filePathCache(filePathCache),
|
||||
m_sourcesManager(sourcesManager)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -91,6 +95,7 @@ private:
|
||||
SymbolEntries &m_symbolEntries;
|
||||
SourceLocationEntries &m_sourceLocationEntries;
|
||||
FilePathCachingInterface &m_filePathCache;
|
||||
SourcesManager &m_sourcesManager;
|
||||
};
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Reference in New Issue
Block a user