[clang] [clang][Darwin] Externalize pseudoprobe and debug info (PR #186873)

David Tellenbach via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 17:46:45 PDT 2026


================
@@ -2913,7 +2913,14 @@ void Driver::BuildUniversalActions(Compilation &C, const ToolChain &TC,
     Arg *A = Args.getLastArg(options::OPT_g_Group);
     bool enablesDebugInfo = A && !A->getOption().matches(options::OPT_g0) &&
                             !A->getOption().matches(options::OPT_gstabs);
-    if ((enablesDebugInfo || willEmitRemarks(Args)) &&
+    bool enablesPseudoProbe =
+        Args.hasFlag(options::OPT_fpseudo_probe_for_profiling,
+                     options::OPT_fno_pseudo_probe_for_profiling, false);
+    bool enablesDebugInfoForProfiling =
+        Args.hasFlag(options::OPT_fdebug_info_for_profiling,
+                     options::OPT_fno_debug_info_for_profiling, false);
+    if ((enablesDebugInfo || willEmitRemarks(Args) || enablesPseudoProbe ||
+         enablesDebugInfoForProfiling) &&
         ContainsCompileOrAssembleAction(Actions.back())) {
 
       // Add a 'dsymutil' step if necessary, when debug info is enabled and we
----------------
dtellenbach wrote:

Can this comment be updated: We now run dsymutil for debuginfo, remarks and pseudo-probes.

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


More information about the cfe-commits mailing list