clang-tools 8.0.0

InMemorySymbolIndex.h
Go to the documentation of this file.
1 //===-- InMemorySymbolIndex.h -----------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INMEMORYSYMBOLINDEX_H
11 #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INMEMORYSYMBOLINDEX_H
12
13 #include "SymbolIndex.h"
14 #include <map>
15 #include <string>
16 #include <vector>
17
18 namespace clang {
19 namespace include_fixer {
20
21 /// Xref database with fixed content.
22 class InMemorySymbolIndex : public SymbolIndex {
23 public:
24 InMemorySymbolIndex(
25 const std::vector<find_all_symbols::SymbolAndSignals> &Symbols);
26
27 std::vector<find_all_symbols::SymbolAndSignals>
28 search(llvm::StringRef Identifier) override;
29
30 private:
31 std::map<std::string, std::vector<find_all_symbols::SymbolAndSignals>>
32 LookupTable;
33 };
34
35 } // namespace include_fixer
36 } // namespace clang
37
38 #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:24
clang::include_fixer::InMemorySymbolIndex
Xref database with fixed content.
Definition: InMemorySymbolIndex.h:22
clang::include_fixer::InMemorySymbolIndex::InMemorySymbolIndex
InMemorySymbolIndex(const std::vector< find_all_symbols::SymbolAndSignals > &Symbols)
Definition: InMemorySymbolIndex.cpp:17
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ChangeNamespace.cpp:18
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:22