[clang] [clang][deps] Use `ModuleDepCollector` for Make output (PR #182063)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 18 09:03:42 PST 2026


================
@@ -950,12 +957,9 @@ void ModuleDepCollector::addVisibleModules() {
 
 static StringRef makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path,
                                           SmallVectorImpl<char> &Storage) {
-  if (llvm::sys::path::is_absolute(Path) &&
-      !llvm::sys::path::is_style_windows(llvm::sys::path::Style::native))
-    return Path;
   Storage.assign(Path.begin(), Path.end());
   CI.getFileManager().makeAbsolutePath(Storage);
-  llvm::sys::path::make_preferred(Storage);
+  llvm::sys::path::remove_dots(Storage, /*remove_dot_dot=*/true);
----------------
jansvoboda11 wrote:

This was added to keep `clang/test/ClangScanDeps/subframework_header_dir_symlink.m` passing. Note that `remove_dots` also changes the separators to the preferred ones.

https://github.com/llvm/llvm-project/pull/182063


More information about the cfe-commits mailing list