[AMDGPU][True16][MC] update VOP1 dasm test with latest script (#120281)
[llvm-project.git] / clang-tools-extra / clangd / index / IndexAction.h
blobecd1f63fb00f2611abf51c1fb0ff0767bf237f74
1 //===--- IndexAction.h - Run the indexer as a frontend action ----*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEXACTION_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEXACTION_H
11 #include "Headers.h"
12 #include "index/SymbolCollector.h"
13 #include "clang/Frontend/FrontendAction.h"
15 namespace clang {
16 namespace clangd {
18 // Creates an action that indexes translation units and delivers the results
19 // for SymbolsCallback (each slab corresponds to one TU).
21 // Only a subset of SymbolCollector::Options are respected:
22 // - include paths are always collected, and canonicalized appropriately
23 // - references are always counted
24 // - all references are collected (if RefsCallback is non-null)
25 // - the symbol origin is set to Static if not specified by caller
26 std::unique_ptr<FrontendAction> createStaticIndexingAction(
27 SymbolCollector::Options Opts,
28 std::function<void(SymbolSlab)> SymbolsCallback,
29 std::function<void(RefSlab)> RefsCallback,
30 std::function<void(RelationSlab)> RelationsCallback,
31 std::function<void(IncludeGraph)> IncludeGraphCallback);
33 } // namespace clangd
34 } // namespace clang
36 #endif