ClangPchManager: Add build dependencies to include collector

It's a first step but we have to refactor the interface later.

Task-number: QTCREATORBUG-21379
Change-Id: Idda666bcaec950203f001c993c54a926779527e0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-10-18 17:22:47 +02:00
parent e571220663
commit ee2122be70
10 changed files with 502 additions and 115 deletions

View File

@@ -25,6 +25,8 @@
#include "clangtool.h"
#include <iostream>
namespace ClangBackEnd {
namespace {

View File

@@ -44,7 +44,7 @@ namespace ClangBackEnd {
class SymbolsVisitorBase
{
public:
SymbolsVisitorBase(FilePathCachingInterface &filePathCache,
SymbolsVisitorBase(const FilePathCachingInterface &filePathCache,
const clang::SourceManager *sourceManager,
SourcesManager &sourcesManager)
: m_filePathCache(filePathCache),
@@ -152,8 +152,13 @@ public:
bool isInSystemHeader(clang::FileID fileId) const
{
return clang::SrcMgr::isSystem(
m_sourceManager->getSLocEntry(fileId).getFile().getFileCharacteristic());
return isSystem(m_sourceManager->getSLocEntry(fileId).getFile().getFileCharacteristic());
}
static
bool isSystem(clang::SrcMgr::CharacteristicKind kind)
{
return clang::SrcMgr::isSystem(kind);
}
void clear()
@@ -163,7 +168,7 @@ public:
protected:
std::vector<FilePathId> m_filePathIndices;
FilePathCachingInterface &m_filePathCache;
const FilePathCachingInterface &m_filePathCache;
const clang::SourceManager *m_sourceManager = nullptr;
SourcesManager &m_sourcesManager;
};