ccls/src/import_pipeline.h

54 lines
1.6 KiB
C
Raw Normal View History

#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-28 16:55:46 +00:00
#include <atomic>
2018-02-05 03:38:57 +00:00
#include <memory>
#include <string>
#include <vector>
struct ClangTranslationUnit;
struct Config;
class DiagnosticsEngine;
2017-12-29 16:29:47 +00:00
struct FileConsumerSharedState;
struct ImportManager;
struct MultiQueueWaiter;
struct Project;
struct QueryDatabase;
struct SemanticHighlightSymbolCache;
struct TimestampManager;
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;
ImportPipelineStatus();
2017-12-28 16:55:46 +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,
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,
DiagnosticsEngine* diag_engine,
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);
bool QueryDb_ImportMain(Config* config,
QueryDatabase* db,
ImportManager* import_manager,
ImportPipelineStatus* status,
SemanticHighlightSymbolCache* semantic_cache,
WorkingFiles* working_files);