ccls/src/cache.h

22 lines
661 B
C
Raw Normal View History

2017-04-09 02:24:32 +00:00
#pragma once
#include <optional.h>
2017-04-09 02:24:32 +00:00
#include <memory>
#include <string>
using std::experimental::optional;
using std::experimental::nullopt;
struct IndexerConfig;
struct IndexFile;
2017-04-09 02:24:32 +00:00
std::unique_ptr<IndexFile> LoadCachedIndex(IndexerConfig* config,
const std::string& filename);
2017-04-22 07:42:57 +00:00
optional<std::string> LoadCachedFileContents(IndexerConfig* config,
const std::string& filename);
2017-04-09 02:24:32 +00:00
2017-04-22 07:42:57 +00:00
void WriteToCache(IndexerConfig* config,
const std::string& filename,
IndexFile& file,
const optional<std::string>& indexed_file_contents);