//===--- Dex.h - Dex Symbol Index Implementation ----------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This defines Dex - a symbol index implementation based on query iterators /// over symbol tokens, such as fuzzy matching trigrams, scopes, types, etc. /// While consuming more memory and having longer build stage due to /// preprocessing, Dex will have substantially lower latency. It will also allow /// efficient symbol searching which is crucial for operations like code /// completion, and can be very important for a number of different code /// transformations which will be eventually supported by Clangd. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_DEX_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_DEX_H #include "index/dex/Iterator.h" #include "index/Index.h" #include "index/Relation.h" #include "index/dex/PostingList.h" #include "index/dex/Token.h" #include "llvm/ADT/StringSet.h" namespace clang { namespace clangd { namespace dex { /// In-memory Dex trigram-based index implementation. class Dex : public SymbolIndex { … }; /// Returns Search Token for a number of parent directories of given Path. /// Should be used within the index build process. /// /// This function is exposed for testing only. llvm::SmallVector<llvm::StringRef, 5> generateProximityURIs(llvm::StringRef); } // namespace dex } // namespace clangd } // namespace clang #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_DEX_H