clang-tools 10.0.0

InMemorySymbolIndex.h
Go to the documentation of this file.
1 //===-- InMemorySymbolIndex.h -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INMEMORYSYMBOLINDEX_H
10 #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INMEMORYSYMBOLINDEX_H
11
12 #include "SymbolIndex.h"
13 #include <map>
14 #include <string>
15 #include <vector>
16
17 namespace clang {
18 namespace include_fixer {
19
20 /// Xref database with fixed content.
21 class InMemorySymbolIndex : public SymbolIndex {
22 public:
23 InMemorySymbolIndex(
24 const std::vector<find_all_symbols::SymbolAndSignals> &Symbols);
25
26 std::vector<find_all_symbols::SymbolAndSignals>
27 search(llvm::StringRef Identifier) override;
28
29 private:
30 std::map<std::string, std::vector<find_all_symbols::SymbolAndSignals>>
31 LookupTable;
32 };
33
34 } // namespace include_fixer
35 } // namespace clang
36
37 #endif // LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INMEMORYSYMBOLINDEX_H
clang::include_fixer::InMemorySymbolIndex::search
std::vector< find_all_symbols::SymbolAndSignals > search(llvm::StringRef Identifier) override
Search for all SymbolInfos corresponding to an identifier.
Definition: InMemorySymbolIndex.cpp:23
clang::include_fixer::InMemorySymbolIndex
Xref database with fixed content.
Definition: InMemorySymbolIndex.h:21
clang::include_fixer::InMemorySymbolIndex::InMemorySymbolIndex
InMemorySymbolIndex(const std::vector< find_all_symbols::SymbolAndSignals > &Symbols)
Definition: InMemorySymbolIndex.cpp:16
Symbols
SymbolSlab Symbols
Definition: SymbolCollectorTests.cpp:295
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27
SymbolIndex.h
clang::include_fixer::SymbolIndex
This class provides an interface for finding all SymbolInfos corresponding to a symbol name from a sy...
Definition: SymbolIndex.h:21