#include "FileIndex.h"
#include "CollectMacros.h"
#include "ParsedAST.h"
#include "clang-include-cleaner/Record.h"
#include "index/Index.h"
#include "index/MemIndex.h"
#include "index/Merge.h"
#include "index/Ref.h"
#include "index/Relation.h"
#include "index/Serialization.h"
#include "index/Symbol.h"
#include "index/SymbolCollector.h"
#include "index/SymbolID.h"
#include "index/SymbolOrigin.h"
#include "index/dex/Dex.h"
#include "support/Logger.h"
#include "support/MemoryTree.h"
#include "support/Path.h"
#include "clang/AST/ASTContext.h"
#include "clang/Index/IndexingAction.h"
#include "clang/Index/IndexingOptions.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <algorithm>
#include <memory>
#include <optional>
#include <tuple>
#include <utility>
#include <vector>
namespace clang {
namespace clangd {
namespace {
SlabTuple indexSymbols(ASTContext &AST, Preprocessor &PP,
llvm::ArrayRef<Decl *> DeclsToIndex,
const MainFileMacros *MacroRefsToIndex,
const include_cleaner::PragmaIncludes &PI,
bool IsIndexMainAST, llvm::StringRef Version,
bool CollectMainFileRefs) { … }
IncludeGraph getSubGraph(llvm::StringRef URI, const IncludeGraph &FullGraph) { … }
}
FileShardedIndex::FileShardedIndex(IndexFileIn Input)
: … { … }
std::vector<llvm::StringRef> FileShardedIndex::getAllSources() const { … }
std::optional<IndexFileIn>
FileShardedIndex::getShard(llvm::StringRef Uri) const { … }
SlabTuple indexMainDecls(ParsedAST &AST) { … }
SlabTuple indexHeaderSymbols(llvm::StringRef Version, ASTContext &AST,
Preprocessor &PP,
const include_cleaner::PragmaIncludes &PI) { … }
FileSymbols::FileSymbols(IndexContents IdxContents)
: … { … }
void FileSymbols::update(llvm::StringRef Key,
std::unique_ptr<SymbolSlab> Symbols,
std::unique_ptr<RefSlab> Refs,
std::unique_ptr<RelationSlab> Relations,
bool CountReferences) { … }
std::unique_ptr<SymbolIndex>
FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle,
size_t *Version) { … }
void FileSymbols::profile(MemoryTree &MT) const { … }
FileIndex::FileIndex()
: … { … }
void FileIndex::updatePreamble(IndexFileIn IF) { … }
void FileIndex::updatePreamble(PathRef Path, llvm::StringRef Version,
ASTContext &AST, Preprocessor &PP,
const include_cleaner::PragmaIncludes &PI) { … }
void FileIndex::updateMain(PathRef Path, ParsedAST &AST) { … }
void FileIndex::profile(MemoryTree &MT) const { … }
}
}