[llvm] [llvm-profgen] Remove temporary perf script files (PR #86668)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 11:01:17 PDT 2024


================
@@ -375,6 +376,9 @@ PerfScriptReader::convertPerfDataToTrace(ProfiledBinary *Binary,
                                           StringRef(ErrorFile)};    // Stderr
   sys::ExecuteAndWait(PerfPath, ScriptMMapArgs, std::nullopt, Redirects);
 
+  PerfScriptReader::markTempFile(PerfTraceFile);
+  PerfScriptReader::markTempFile(ErrorFile);
----------------
WenleiHe wrote:

I meant to suggest combing "createUniquePath" and "markTempFile" into a single helper, so people won't create a temp file and forget to mark it as temp.. 

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


More information about the llvm-commits mailing list