@@ -239,8 +239,8 @@ SlabTuple indexHeaderSymbols(llvm::StringRef Version, ASTContext &AST,
239239 /* CollectMainFileRefs=*/ false );
240240}
241241
242- FileSymbols::FileSymbols (IndexContents IdxContents)
243- : IdxContents(IdxContents) {}
242+ FileSymbols::FileSymbols (IndexContents IdxContents, bool SupportContainedRefs )
243+ : IdxContents(IdxContents), SupportContainedRefs(SupportContainedRefs) {}
244244
245245void FileSymbols::update (llvm::StringRef Key,
246246 std::unique_ptr<SymbolSlab> Symbols,
@@ -395,7 +395,7 @@ FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle,
395395 std::move (AllRelations), std::move (Files), IdxContents,
396396 std::make_tuple (std::move (SymbolSlabs), std::move (RefSlabs),
397397 std::move (RefsStorage), std::move (SymsStorage)),
398- StorageSize);
398+ StorageSize, SupportContainedRefs );
399399 }
400400 llvm_unreachable (" Unknown clangd::IndexType" );
401401}
@@ -419,11 +419,12 @@ void FileSymbols::profile(MemoryTree &MT) const {
419419 }
420420}
421421
422- FileIndex::FileIndex ()
422+ FileIndex::FileIndex (bool SupportContainedRefs )
423423 : MergedIndex(&MainFileIndex, &PreambleIndex),
424- PreambleSymbols (IndexContents::Symbols | IndexContents::Relations),
424+ PreambleSymbols (IndexContents::Symbols | IndexContents::Relations,
425+ SupportContainedRefs),
425426 PreambleIndex(std::make_unique<MemIndex>()),
426- MainFileSymbols(IndexContents::All),
427+ MainFileSymbols(IndexContents::All, SupportContainedRefs ),
427428 MainFileIndex(std::make_unique<MemIndex>()) {}
428429
429430void FileIndex::updatePreamble (IndexFileIn IF) {
0 commit comments