Clang: Add Process Generator

So far we only compiled the precompiled headers only sequentially. The
process generator is creating, managing a queue of processes to compile
the PCHs parallel.

Change-Id: I8075def4ef9e6b0191bbd51b3631d1c51ec7b361
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-01-31 14:21:05 +01:00
parent 92263a0535
commit ea4141ee14
23 changed files with 884 additions and 95 deletions

View File

@@ -64,16 +64,18 @@ public:
llvm::StringRef /*relativePath*/,
const clang::Module */*imported*/) override
{
auto fileUID = file->getUID();
if (file) {
auto fileUID = file->getUID();
flagIncludeAlreadyRead(file);
flagIncludeAlreadyRead(file);
if (isNotInExcludedIncludeUID(fileUID)) {
auto notAlreadyIncluded = isNotAlreadyIncluded(fileUID);
if (notAlreadyIncluded.first) {
m_alreadyIncludedFileUIDs.insert(notAlreadyIncluded.second, fileUID);
uint includeId = m_filePathCache.stringId({fileName.data(), fileName.size()});
m_includeIds.emplace_back(includeId);
if (isNotInExcludedIncludeUID(fileUID)) {
auto notAlreadyIncluded = isNotAlreadyIncluded(fileUID);
if (notAlreadyIncluded.first) {
m_alreadyIncludedFileUIDs.insert(notAlreadyIncluded.second, fileUID);
uint includeId = m_filePathCache.stringId({fileName.data(), fileName.size()});
m_includeIds.emplace_back(includeId);
}
}
}
}