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

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 9 09:40:19 PST 2018


aprantl added inline comments.


================
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");
+    }
----------------
jingham wrote:
> 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?
> Is there a reason not to have GetClangModulesCachePath do this?
Yes. It is supposed to return the value of the *property*. Also, I assume that Target doesn't necessarily link against Clang, so calling into a Clang API there seems to be a layering violation.


https://reviews.llvm.org/D43099





More information about the lldb-commits mailing list