[llvm-branch-commits] [clang-tools-extra-branch] r354982 - Merging r354505:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 27 06:56:39 PST 2019
Author: hans
Date: Wed Feb 27 06:56:39 2019
New Revision: 354982
URL: http://llvm.org/viewvc/llvm-project?rev=354982&view=rev
Log:
Merging r354505:
------------------------------------------------------------------------
r354505 | ibiryukov | 2019-02-20 20:08:06 +0100 (Wed, 20 Feb 2019) | 13 lines
[clangd] Store index in '.clangd/index' instead of '.clangd-index'
Summary: To take up the .clangd folder for other potential uses in the future.
Reviewers: kadircet, sammccall
Reviewed By: kadircet
Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58440
------------------------------------------------------------------------
Modified:
clang-tools-extra/branches/release_80/ (props changed)
clang-tools-extra/branches/release_80/clangd/index/Background.h
clang-tools-extra/branches/release_80/clangd/index/BackgroundIndexStorage.cpp
clang-tools-extra/branches/release_80/test/clangd/background-index.test
Propchange: clang-tools-extra/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 27 06:56:39 2019
@@ -1 +1 @@
-/clang-tools-extra/trunk:351463,351466-351468,351531,351686,351738,351788,352040,352231,353327,353422
+/clang-tools-extra/trunk:351463,351466-351468,351531,351686,351738,351788,352040,352231,353327,353422,354505
Modified: clang-tools-extra/branches/release_80/clangd/index/Background.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/branches/release_80/clangd/index/Background.h?rev=354982&r1=354981&r2=354982&view=diff
==============================================================================
--- clang-tools-extra/branches/release_80/clangd/index/Background.h (original)
+++ clang-tools-extra/branches/release_80/clangd/index/Background.h Wed Feb 27 06:56:39 2019
@@ -55,7 +55,7 @@ public:
llvm::unique_function<BackgroundIndexStorage *(llvm::StringRef)>;
// Creates an Index Storage that saves shards into disk. Index storage uses
- // CDBDirectory + ".clangd-index/" as the folder to save shards.
+ // CDBDirectory + ".clangd/index/" as the folder to save shards.
static Factory createDiskBackedStorageFactory();
};
Modified: clang-tools-extra/branches/release_80/clangd/index/BackgroundIndexStorage.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/branches/release_80/clangd/index/BackgroundIndexStorage.cpp?rev=354982&r1=354981&r2=354982&view=diff
==============================================================================
--- clang-tools-extra/branches/release_80/clangd/index/BackgroundIndexStorage.cpp (original)
+++ clang-tools-extra/branches/release_80/clangd/index/BackgroundIndexStorage.cpp Wed Feb 27 06:56:39 2019
@@ -64,19 +64,19 @@ writeAtomically(llvm::StringRef OutPath,
}
// Uses disk as a storage for index shards. Creates a directory called
-// ".clangd-index/" under the path provided during construction.
+// ".clangd/index/" under the path provided during construction.
class DiskBackedIndexStorage : public BackgroundIndexStorage {
std::string DiskShardRoot;
public:
- // Sets DiskShardRoot to (Directory + ".clangd-index/") which is the base
+ // Sets DiskShardRoot to (Directory + ".clangd/index/") which is the base
// directory for all shard files.
DiskBackedIndexStorage(llvm::StringRef Directory) {
llvm::SmallString<128> CDBDirectory(Directory);
- llvm::sys::path::append(CDBDirectory, ".clangd-index/");
+ llvm::sys::path::append(CDBDirectory, ".clangd", "index");
DiskShardRoot = CDBDirectory.str();
std::error_code OK;
- std::error_code EC = llvm::sys::fs::create_directory(DiskShardRoot);
+ std::error_code EC = llvm::sys::fs::create_directories(DiskShardRoot);
if (EC != OK) {
elog("Failed to create directory {0} for index storage: {1}",
DiskShardRoot, EC.message());
Modified: clang-tools-extra/branches/release_80/test/clangd/background-index.test
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/branches/release_80/test/clangd/background-index.test?rev=354982&r1=354981&r2=354982&view=diff
==============================================================================
--- clang-tools-extra/branches/release_80/test/clangd/background-index.test (original)
+++ clang-tools-extra/branches/release_80/test/clangd/background-index.test Wed Feb 27 06:56:39 2019
@@ -13,7 +13,7 @@
# RUN: clangd -background-index -background-index-rebuild-period=0 -lit-test < %t/definition.jsonrpc | FileCheck %t/definition.jsonrpc
# Test that the index is writing files in the expected location.
-# RUN: ls %t/.clangd-index/foo.cpp.*.idx
+# RUN: ls %t/.clangd/index/foo.cpp.*.idx
# Test the index is read from disk: delete code and restart clangd.
# RUN: rm %t/foo.cpp
More information about the llvm-branch-commits
mailing list