[Lldb-commits] [PATCH] D43099: Make LLDB's clang module cache path customizable

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 8 17:03:04 PST 2018


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

Think about whether it would be better to have GetClangModulesCachePath calculate the fallback modules path rather than having the client do it?



================
Comment at: source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:595-601
+    if (Path.empty()) {
+      // This code is copied from the Clang driver.
+      const bool erased_on_reboot = false;
+      llvm::sys::path::system_temp_directory(erased_on_reboot, Path);
+      llvm::sys::path::append(Path, "org.llvm.clang");
+      llvm::sys::path::append(Path, "ModuleCache");
+    }
----------------
Is there a reason not to have GetClangModulesCachePath do this?  This is roughly the "default value" of the value.  Is there a good reason to make clients compute that?

I presume you are computing this here because clang doesn't offer an API to do that?


https://reviews.llvm.org/D43099





More information about the lldb-commits mailing list