forked from OSchip/llvm-project
[clangd] Log directory when a CDB is loaded
Summary: Fixes https://github.com/clangd/clangd/issues/268 Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73628
This commit is contained in:
parent
df8a986f53
commit
4fb1adcde2
|
@ -115,9 +115,11 @@ DirectoryBasedGlobalCompilationDatabase::getCDBInDirLocked(PathRef Dir) const {
|
|||
auto R = CompilationDatabases.try_emplace(Key);
|
||||
if (R.second) { // Cache miss, try to load CDB.
|
||||
CachedCDB &Entry = R.first->second;
|
||||
std::string Error = "";
|
||||
std::string Error;
|
||||
Entry.CDB = tooling::CompilationDatabase::loadFromDirectory(Dir, Error);
|
||||
Entry.Path = std::string(Dir);
|
||||
if (Entry.CDB)
|
||||
log("Loaded compilation database from {0}", Dir);
|
||||
}
|
||||
return R.first->second;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue