2017-12-24 01:30:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-29 16:29:47 +00:00
|
|
|
// FIXME: do not include clang-c outside of clang_ files.
|
|
|
|
#include <clang-c/Index.h>
|
2017-12-24 01:30:52 +00:00
|
|
|
|
2017-12-28 16:55:46 +00:00
|
|
|
#include <atomic>
|
2018-02-05 03:38:57 +00:00
|
|
|
#include <memory>
|
2017-12-24 01:30:52 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
struct ClangTranslationUnit;
|
|
|
|
struct Config;
|
2017-12-29 16:29:47 +00:00
|
|
|
struct FileConsumerSharedState;
|
2017-12-24 01:30:52 +00:00
|
|
|
struct ImportManager;
|
2017-12-29 15:52:43 +00:00
|
|
|
struct MultiQueueWaiter;
|
|
|
|
struct Project;
|
2017-12-24 01:30:52 +00:00
|
|
|
struct QueryDatabase;
|
|
|
|
struct SemanticHighlightSymbolCache;
|
2017-12-29 15:52:43 +00:00
|
|
|
struct TimestampManager;
|
2017-12-24 01:30:52 +00:00
|
|
|
struct WorkingFiles;
|
|
|
|
|
2017-12-28 16:55:46 +00:00
|
|
|
struct ImportPipelineStatus {
|
|
|
|
std::atomic<int> num_active_threads;
|
2018-01-07 21:37:30 +00:00
|
|
|
std::atomic<long long> next_progress_output;
|
2017-12-28 18:21:30 +00:00
|
|
|
|
|
|
|
ImportPipelineStatus();
|
2017-12-28 16:55:46 +00:00
|
|
|
};
|
|
|
|
|
2017-12-24 01:30:52 +00:00
|
|
|
void IndexWithTuFromCodeCompletion(
|
2018-02-01 05:48:39 +00:00
|
|
|
Config* config,
|
2017-12-29 16:29:47 +00:00
|
|
|
FileConsumerSharedState* file_consumer_shared,
|
2017-12-24 01:30:52 +00:00
|
|
|
ClangTranslationUnit* tu,
|
|
|
|
const std::vector<CXUnsavedFile>& file_contents,
|
|
|
|
const std::string& path,
|
|
|
|
const std::vector<std::string>& args);
|
|
|
|
|
2017-12-29 15:56:34 +00:00
|
|
|
void Indexer_Main(Config* config,
|
2017-12-29 16:29:47 +00:00
|
|
|
FileConsumerSharedState* file_consumer_shared,
|
2017-12-29 15:56:34 +00:00
|
|
|
TimestampManager* timestamp_manager,
|
|
|
|
ImportManager* import_manager,
|
|
|
|
ImportPipelineStatus* status,
|
|
|
|
Project* project,
|
|
|
|
WorkingFiles* working_files,
|
|
|
|
MultiQueueWaiter* waiter);
|
2017-12-29 15:52:43 +00:00
|
|
|
|
2017-12-24 01:30:52 +00:00
|
|
|
bool QueryDb_ImportMain(Config* config,
|
|
|
|
QueryDatabase* db,
|
|
|
|
ImportManager* import_manager,
|
2018-01-07 21:06:18 +00:00
|
|
|
ImportPipelineStatus* status,
|
2017-12-24 01:30:52 +00:00
|
|
|
SemanticHighlightSymbolCache* semantic_cache,
|
|
|
|
WorkingFiles* working_files);
|