From 7977bf3edb6b924e86bbd9c9810233b8e68cf26b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 23 Dec 2018 11:30:31 -0800 Subject: [PATCH] Make cacheDirectory related to project root; delete Timer --- src/messages/initialize.cc | 5 +++-- src/pipeline.cc | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/messages/initialize.cc b/src/messages/initialize.cc index a62d43e9..63b7803c 100644 --- a/src/messages/initialize.cc +++ b/src/messages/initialize.cc @@ -271,8 +271,9 @@ void Initialize(MessageHandler *m, InitializeParam ¶m, ReplyOnce &reply) { if (g_config->cacheDirectory.size()) { SmallString<256> Path(g_config->cacheDirectory); - sys::fs::make_absolute(Path); - g_config->cacheDirectory = Path.str(); + sys::fs::make_absolute(project_path, Path); + // Use upper case for the Driver letter on Windows. + g_config->cacheDirectory = NormalizePath(Path.str()); EnsureEndsInSlash(g_config->cacheDirectory); } } diff --git a/src/pipeline.cc b/src/pipeline.cc index 002e4bca..0e5e031c 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -19,7 +19,6 @@ #include #include -#include using namespace llvm; #include @@ -423,10 +422,7 @@ void Main_OnIndexed(DB *db, WorkingFiles *wfiles, IndexUpdate *update) { return; } - static Timer timer("apply", "apply index"); - timer.startTimer(); db->ApplyIndexUpdate(update); - timer.stopTimer(); // Update indexed content, skipped ranges, and semantic highlighting. if (update->files_def_update) {