1 //===-- SymbolIndex.h - Interface for symbol-header matching ----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H
10 #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H
12 #include "find-all-symbols/SymbolInfo.h"
13 #include "llvm/ADT/StringRef.h"
17 namespace include_fixer
{
19 /// This class provides an interface for finding all `SymbolInfo`s corresponding
20 /// to a symbol name from a symbol database.
23 virtual ~SymbolIndex() = default;
25 /// Search for all `SymbolInfo`s corresponding to an identifier.
26 /// \param Identifier The unqualified identifier being searched for.
27 /// \returns A list of `SymbolInfo` candidates.
28 // FIXME: Expose the type name so we can also insert using declarations (or
30 virtual std::vector
<find_all_symbols::SymbolAndSignals
>
31 search(llvm::StringRef Identifier
) = 0;
34 } // namespace include_fixer
37 #endif // LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H