data: indexer processes
* TaskBuildIndex starts seperate indexer processes and communicates via shared memory * indexer processes get restarted if they fail * indexer processes are killed when the app closes or crashes * added utility class SharedMemory to allocate and access shared memory, providing basic data structures * added SharedMemoryGarbageCollector for keeping track of running instances and cleaning up shared memory in case of a crash * show errors for source files that crashed during indexing * added basic exception handling to task scheduling * added option to turn off processes and use threads in preferences, but still use shared memory fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "data/parser/cxx/ASTConsumer.h"
|
||||
|
||||
#include "data/parser/cxx/CxxAstVisitor.h"
|
||||
#include "data/parser/cxx/CxxVerboseAstVisitor.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
@@ -11,7 +12,9 @@ ASTConsumer::ASTConsumer(
|
||||
std::shared_ptr<FilePathCache> canonicalFilePathCache
|
||||
)
|
||||
{
|
||||
if (ApplicationSettings::getInstance()->getLoggingEnabled() && ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled())
|
||||
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
|
||||
|
||||
if (appSettings->getLoggingEnabled() && appSettings->getVerboseIndexerLoggingEnabled())
|
||||
{
|
||||
m_visitor = std::make_shared<CxxVerboseAstVisitor>(context, preprocessor, client, fileRegister, canonicalFilePathCache);
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ bool CxxAstVisitor::TraverseTemplateTemplateParmDecl(clang::TemplateTemplateParm
|
||||
|
||||
bool CxxAstVisitor::VisitTranslationUnitDecl(clang::TranslationUnitDecl *d)
|
||||
{
|
||||
return !m_client->cancelOnFatalErrors() || !m_client->hasFatalErrors();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CxxAstVisitor::TraverseNestedNameSpecifierLoc(clang::NestedNameSpecifierLoc loc)
|
||||
|
||||
@@ -22,7 +22,6 @@ public:
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxManual> indexerCommand);
|
||||
void buildIndex(const std::string& fileName, std::shared_ptr<TextAccess> fileContent);
|
||||
|
||||
|
||||
private:
|
||||
std::vector<std::string> getCommandlineArgumentsEssential(
|
||||
const std::vector<std::string>& compilerFlags,
|
||||
|
||||
Reference in New Issue
Block a user