[clang] Fix print module manifest file for macos (PR #122370)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 18:36:46 PST 2025


================
@@ -6380,6 +6380,11 @@ std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const {
   if (llvm::sys::fs::exists(Twine(R)))
     return std::string(R);
 
+  SmallString<128> R2(ResourceDir);
+  llvm::sys::path::append(R2, "..", "..", Name);
+  if (llvm::sys::fs::exists(Twine(R2)))
+    return std::string(R2);
----------------
ChuanqiXu9 wrote:

Can you move this in front of `return std::string(Name);`?

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


More information about the cfe-commits mailing list