Changeset View
Changeset View
Standalone View
Standalone View
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | clang::FrontendAction *create() override { | ||||
index::IndexingOptions IndexOpts; | index::IndexingOptions IndexOpts; | ||||
IndexOpts.SystemSymbolFilter = | IndexOpts.SystemSymbolFilter = | ||||
index::IndexingOptions::SystemSymbolFilterKind::All; | index::IndexingOptions::SystemSymbolFilterKind::All; | ||||
IndexOpts.IndexFunctionLocals = false; | IndexOpts.IndexFunctionLocals = false; | ||||
auto CollectorOpts = SymbolCollector::Options(); | auto CollectorOpts = SymbolCollector::Options(); | ||||
CollectorOpts.FallbackDir = AssumedHeaderDir; | CollectorOpts.FallbackDir = AssumedHeaderDir; | ||||
CollectorOpts.CollectIncludePath = true; | CollectorOpts.CollectIncludePath = true; | ||||
CollectorOpts.CountReferences = true; | |||||
auto Includes = llvm::make_unique<CanonicalIncludes>(); | auto Includes = llvm::make_unique<CanonicalIncludes>(); | ||||
addSystemHeadersMapping(Includes.get()); | addSystemHeadersMapping(Includes.get()); | ||||
CollectorOpts.Includes = Includes.get(); | CollectorOpts.Includes = Includes.get(); | ||||
return new WrappedIndexAction( | return new WrappedIndexAction( | ||||
std::make_shared<SymbolCollector>(std::move(CollectorOpts)), | std::make_shared<SymbolCollector>(std::move(CollectorOpts)), | ||||
std::move(Includes), IndexOpts, Ctx); | std::move(Includes), IndexOpts, Ctx); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |