[clangd] Support URISchemes configuration in BackgroundIndex.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Differential Revision: https://reviews.llvm.org/D53503

llvm-svn: 344912
diff --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp
index 8f40075..9137d1d 100644
--- a/clang-tools-extra/clangd/index/Background.cpp
+++ b/clang-tools-extra/clangd/index/Background.cpp
@@ -24,10 +24,11 @@
 
 BackgroundIndex::BackgroundIndex(Context BackgroundContext,
                                  StringRef ResourceDir,
-                                 const FileSystemProvider &FSProvider)
+                                 const FileSystemProvider &FSProvider,
+                                 ArrayRef<std::string> URISchemes)
     : SwapIndex(make_unique<MemIndex>()), ResourceDir(ResourceDir),
       FSProvider(FSProvider), BackgroundContext(std::move(BackgroundContext)),
-      Thread([this] { run(); }) {}
+      URISchemes(URISchemes), Thread([this] { run(); }) {}
 
 BackgroundIndex::~BackgroundIndex() {
   stop();
@@ -185,7 +186,7 @@
   // FIXME: this should rebuild once-in-a-while, not after every file.
   //       At that point we should use Dex, too.
   vlog("Rebuilding automatic index");
-  reset(IndexedSymbols.buildIndex(IndexType::Light));
+  reset(IndexedSymbols.buildIndex(IndexType::Light, URISchemes));
   return Error::success();
 }