Make cacheDirectory related to project root; delete Timer

This commit is contained in:
Fangrui Song 2018-12-23 11:30:31 -08:00
parent 9a0ff147ab
commit 4b5b06f501
2 changed files with 1 additions and 5 deletions

View File

@ -282,7 +282,7 @@ void Initialize(MessageHandler *m, InitializeParam &param, ReplyOnce &reply) {
if (g_config->cacheDirectory.size()) {
SmallString<256> Path(g_config->cacheDirectory);
sys::fs::make_absolute(Path);
sys::fs::make_absolute(project_path, Path);
g_config->cacheDirectory = Path.str();
EnsureEndsInSlash(g_config->cacheDirectory);
}

View File

@ -31,7 +31,6 @@ limitations under the License.
#include <llvm/Support/Process.h>
#include <llvm/Support/Threading.h>
#include <llvm/Support/Timer.h>
using namespace llvm;
#include <chrono>
@ -435,10 +434,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) {