mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-03 22:04:24 +00:00 
			
		
		
		
	Make cacheDirectory related to project root; delete Timer
This commit is contained in:
		
							parent
							
								
									f2df43055f
								
							
						
					
					
						commit
						828c21c8d7
					
				@ -282,8 +282,9 @@ void Initialize(MessageHandler *m, InitializeParam ¶m, ReplyOnce &reply) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (g_config->cacheDirectory.size()) {
 | 
					    if (g_config->cacheDirectory.size()) {
 | 
				
			||||||
      SmallString<256> Path(g_config->cacheDirectory);
 | 
					      SmallString<256> Path(g_config->cacheDirectory);
 | 
				
			||||||
      sys::fs::make_absolute(Path);
 | 
					      sys::fs::make_absolute(project_path, Path);
 | 
				
			||||||
      g_config->cacheDirectory = Path.str();
 | 
					      // Use upper case for the Driver letter on Windows.
 | 
				
			||||||
 | 
					      g_config->cacheDirectory = NormalizePath(Path.str());
 | 
				
			||||||
      EnsureEndsInSlash(g_config->cacheDirectory);
 | 
					      EnsureEndsInSlash(g_config->cacheDirectory);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,6 @@ limitations under the License.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <llvm/Support/Process.h>
 | 
					#include <llvm/Support/Process.h>
 | 
				
			||||||
#include <llvm/Support/Threading.h>
 | 
					#include <llvm/Support/Threading.h>
 | 
				
			||||||
#include <llvm/Support/Timer.h>
 | 
					 | 
				
			||||||
using namespace llvm;
 | 
					using namespace llvm;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <chrono>
 | 
					#include <chrono>
 | 
				
			||||||
@ -435,10 +434,7 @@ void Main_OnIndexed(DB *db, WorkingFiles *wfiles, IndexUpdate *update) {
 | 
				
			|||||||
    return;
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  static Timer timer("apply", "apply index");
 | 
					 | 
				
			||||||
  timer.startTimer();
 | 
					 | 
				
			||||||
  db->ApplyIndexUpdate(update);
 | 
					  db->ApplyIndexUpdate(update);
 | 
				
			||||||
  timer.stopTimer();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Update indexed content, skipped ranges, and semantic highlighting.
 | 
					  // Update indexed content, skipped ranges, and semantic highlighting.
 | 
				
			||||||
  if (update->files_def_update) {
 | 
					  if (update->files_def_update) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user