diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/Serialization.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/index/Serialization.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/index/Serialization.cpp b/clang-tools-extra/clangd/index/Serialization.cpp index 4f5413a7ecf..5e16137f8b2 100644 --- a/clang-tools-extra/clangd/index/Serialization.cpp +++ b/clang-tools-extra/clangd/index/Serialization.cpp @@ -6,8 +6,10 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// + #include "Serialization.h" #include "Index.h" +#include "Logger.h" #include "RIFF.h" #include "Trace.h" #include "dex/Dex.h" @@ -433,8 +435,12 @@ std::unique_ptr<SymbolIndex> loadIndex(llvm::StringRef SymbolFilename, } trace::Span Tracer("BuildIndex"); - return UseDex ? dex::Dex::build(std::move(Symbols), URISchemes) - : MemIndex::build(std::move(Symbols), std::move(Refs)); + auto Index = UseDex ? dex::Dex::build(std::move(Symbols), URISchemes) + : MemIndex::build(std::move(Symbols), std::move(Refs)); + vlog("Loaded {0} from {1} with estimated memory usage {2}", + UseDex ? "Dex" : "MemIndex", SymbolFilename, + Index->estimateMemoryUsage()); + return Index; } } // namespace clangd |

