[clang] [clang][ModulesDriver] Fix build failure with Xcode 14 (PR #187713)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 20 07:48:15 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-driver

Author: Naveen Seth Hanig (naveen-seth)

<details>
<summary>Changes</summary>

As pointed out by https://github.com/llvm/llvm-project/pull/152770#issuecomment-4096179622, 81e8a1e causes build errors with older versions of Xcode (Xcode 14 and older).

This implements the same fix as described in d1d9413.

---
Full diff: https://github.com/llvm/llvm-project/pull/187713.diff


1 Files Affected:

- (modified) clang/lib/Driver/ModulesDriver.cpp (+1-2) 


``````````diff
diff --git a/clang/lib/Driver/ModulesDriver.cpp b/clang/lib/Driver/ModulesDriver.cpp
index 8740f9615d304..bbad357be0aa1 100644
--- a/clang/lib/Driver/ModulesDriver.cpp
+++ b/clang/lib/Driver/ModulesDriver.cpp
@@ -1412,8 +1412,7 @@ pruneUnusedStdlibModuleJobs(CompilationGraph &Graph,
         llvm::map_range(llvm::depth_first(cast<CGNode>(PrunableJobNodeRoot)),
                         llvm::CastTo<JobNode>);
     auto ReachableNonImageNodes = llvm::make_filter_range(
-        ReachableJobNodes, std::not_fn(llvm::IsaPred<ImageJobNode>));
-
+        ReachableJobNodes, [](auto *N) { return !llvm::isa<ImageJobNode>(N); });
     PrunableJobNodes.insert_range(ReachableNonImageNodes);
   }
 

``````````

</details>


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


More information about the cfe-commits mailing list