diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2024-08-13 08:39:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 08:39:11 -0700 |
commit | 17dc43d623281cc7169c80574ac5058aa0f78b56 (patch) | |
tree | 02fbf8057cfc7e67a584cdb79ee0682ccda8e3e0 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 1ae507d1091377f560c1f458487472da1730e1be (diff) | |
download | llvm-17dc43d623281cc7169c80574ac5058aa0f78b56.zip llvm-17dc43d623281cc7169c80574ac5058aa0f78b56.tar.gz llvm-17dc43d623281cc7169c80574ac5058aa0f78b56.tar.bz2 |
[clang] Stop adjusting the module cache path (#102540)
This patch stops adjustments of the module cache path beyond what is
done in `ParseHeaderSearchArgs` (making it absolute and removing dots).
This enables more efficient implementation of the caching VFS in
https://github.com/llvm/llvm-project/pull/88800.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 6242b5a..1364641 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1659,9 +1659,8 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { // Walk the entire module cache, looking for unused module files and module // indices. std::error_code EC; - SmallString<128> ModuleCachePathNative; - llvm::sys::path::native(HSOpts.ModuleCachePath, ModuleCachePathNative); - for (llvm::sys::fs::directory_iterator Dir(ModuleCachePathNative, EC), DirEnd; + for (llvm::sys::fs::directory_iterator Dir(HSOpts.ModuleCachePath, EC), + DirEnd; Dir != DirEnd && !EC; Dir.increment(EC)) { // If we don't have a directory, there's nothing to look into. if (!llvm::sys::fs::is_directory(Dir->path())) |