@@ -236,6 +236,9 @@ SlabTuple indexHeaderSymbols(llvm::StringRef Version, ASTContext &AST,
236236 /* CollectMainFileRefs=*/ false );
237237}
238238
239+ FileSymbols::FileSymbols (IndexContents IdxContents)
240+ : IdxContents(IdxContents) {}
241+
239242void FileSymbols::update (llvm::StringRef Key,
240243 std::unique_ptr<SymbolSlab> Symbols,
241244 std::unique_ptr<RefSlab> Refs,
@@ -376,14 +379,14 @@ FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle,
376379 case IndexType::Light:
377380 return std::make_unique<MemIndex>(
378381 llvm::make_pointee_range (AllSymbols), std::move (AllRefs),
379- std::move (AllRelations), std::move (Files),
382+ std::move (AllRelations), std::move (Files), IdxContents,
380383 std::make_tuple (std::move (SymbolSlabs), std::move (RefSlabs),
381384 std::move (RefsStorage), std::move (SymsStorage)),
382385 StorageSize);
383386 case IndexType::Heavy:
384387 return std::make_unique<dex::Dex>(
385388 llvm::make_pointee_range (AllSymbols), std::move (AllRefs),
386- std::move (AllRelations), std::move (Files),
389+ std::move (AllRelations), std::move (Files), IdxContents,
387390 std::make_tuple (std::move (SymbolSlabs), std::move (RefSlabs),
388391 std::move (RefsStorage), std::move (SymsStorage)),
389392 StorageSize);
@@ -412,7 +415,9 @@ void FileSymbols::profile(MemoryTree &MT) const {
412415
413416FileIndex::FileIndex ()
414417 : MergedIndex(&MainFileIndex, &PreambleIndex),
418+ PreambleSymbols (IndexContents::Symbols | IndexContents::Relations),
415419 PreambleIndex(std::make_unique<MemIndex>()),
420+ MainFileSymbols(IndexContents::All),
416421 MainFileIndex(std::make_unique<MemIndex>()) {}
417422
418423void FileIndex::updatePreamble (PathRef Path, llvm::StringRef Version,
0 commit comments