kadircet added inline comments.

================
Comment at: clangd/index/Background.h:39
+  retrieveShard(llvm::StringRef ShardIdentifier, FileDigest Hash) const = 0;
+  virtual bool initialize(llvm::StringRef Directory) = 0;
+};
----------------
kadircet wrote:
> sammccall wrote:
> > kadircet wrote:
> > > sammccall wrote:
> > > > Why not use the constructor? what does "directory" mean in the general 
> > > > case?
> > > Directory refers to the one specified in CompilationDatabase(which is 
> > > usually the build directory?), sorry for the inconvenience.
> > > I wasn't sure about where we plan to instantiate BackgroundIndex. If you 
> > > plan to do that initialization at a point in which we already know the 
> > > build directory we can move that to constructor, especially only to the 
> > > constructor of DiskBackedIndexStorage.
> > tooling::CompileCommand::WorkingDirectory? That doesn't seem especially 
> > relevant here.
> > Or the directory that the CDB was discovered in?
> > 
> > Yes, this seems to be only relevant to DiskBackedIndexStorage
> I suppose you meant `tooling::CompileCommand::Directory` rather than 
> `WorkingDirectory` ? That is the one I was talking about, why do you think it 
> is irrelevant ?
Changed logic to use Directory passed to enqueueAll or enqueue, which I assume 
is the directory that the compilation database lives. And I assumed we will 
have at most one compilation database per directory.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54269



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to