================
@@ -0,0 +1,339 @@
+//===----------------- ModulesBuilder.cpp ------------------------*- 
C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ModulesBuilder.h"
+#include "PrerequisiteModules.h"
+#include "support/Logger.h"
+
+#include "clang/Frontend/FrontendAction.h"
+#include "clang/Frontend/FrontendActions.h"
+
+namespace clang {
+namespace clangd {
+
+namespace {
+
+/// Get or create a path to store module files. Generally it should be:
+///
+///   project_root/.cache/clangd/module_files/{RequiredPrefixDir}/.
----------------
kadircet wrote:

as things stand today these are not really "cache" files, but rather 
"temporary" files, similar to clangd's preambles.

as a result, if clangd process dies unexpectedly, we'll just leak all of these 
pcms indefinitely, which is quite expensive for the user.

can you move this to `/tmp/` instead, until we start sharing pcms and have a 
reason to use a "persistent" storage?

https://github.com/llvm/llvm-project/pull/66462
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to