[clang] [llvm] [memprof] Add memprof options as a clang frontend flag (PR #128615)

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 07:29:52 PST 2025


================
@@ -734,6 +755,10 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
 
   getMachOToolChain().addProfileRTLibs(Args, CmdArgs);
 
+  if (Args.hasArg(options::OPT_fmemory_profile_runtime_default_options_EQ))
+    if (hasExportSymbolDirective(Args))
+      addExportedSymbol(CmdArgs, "___memprof_default_options_str");
----------------
teresajohnson wrote:

Can you refactor out the uses of this string to a constexpr string in the MemProfiler.h header?

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


More information about the cfe-commits mailing list